-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect behavior of select().eq("column", None)
#403
Labels
bug
Something isn't working
Comments
According to the Python doc, this is how null checking is achieved: https://supabase.com/docs/reference/python/is data, count = supabase.table('countries')
.select('*')
.is_('name', 'null')
.execute() |
As @sapphire008 has stated you should use the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Describe the bug
If a table contains a nullable column, then trying to use that column in a filter via
.eq(column, None)
produces rows where the column has text "None" (instead of matching NULL values); and using.is_(column, None)
produces an error"failed to parse filter (is.None)"
.To Reproduce
Create a simple table "tmp" with a nullable column "text" of type
text
:Insert records:
Query the table via the python client:
Expected behavior
Actual behavior: Row 1 is returned (where the text is "None"),
Expected behavior: Row 2 is returned (where the text is NULL).
System information
Additional context
Can be fixed by redefining the function
eq()
inBaseFilterRequestBuilder
as follows:The text was updated successfully, but these errors were encountered: