postgrest-py icon indicating copy to clipboard operation
postgrest-py copied to clipboard

Implement or filter

Open dreinon opened this issue 2 years ago • 1 comments

Since we have a different way to use the not operator than postgrest-js does, an idea for the or filter might be:

 supabase_client.table("table")
        .select("*")
        .or()
        .eq("col1", "value1a")
        .eq("col1", "value1b")
        .end_or
        .eq("col2", "value2")
        .execute()

The end_or can be a property, but or has to be a method since the user should be able pass a foreign_table as an argument.

dreinon avatar Jul 04 '22 00:07 dreinon

Thanks for making the issue, and/or filters are a pretty important feature we haven't yet implemented Although this version feels a little hacky to me; I'd rather we implement another style of queries itself, something like what I had implemented in an old fork of mine

anand2312 avatar Jul 04 '22 14:07 anand2312

This would also be extremely helpful!

benrapport avatar Jan 01 '24 23:01 benrapport

Any plans to implement this soon?

levity avatar Jan 08 '24 19:01 levity

The work on this can be seen in this PR https://github.com/supabase-community/postgrest-py/pull/355

silentworks avatar Jan 15 '24 04:01 silentworks

This has now been merged in and available from version 0.14.0 of the Postgrest Python library.

silentworks avatar Jan 15 '24 14:01 silentworks