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
Matching on null fails to return anything #917
Comments
You should use the isFilter for that case. |
Thanks, this worked, but I don't think we should close this ticket because match accepts null values but they don't actually work. |
Yeah, it might make sense to add an assersion for this. |
Sorry this actually is broken again. isFilter was working but now it is returning this error
In my case I am passing in a nullable string. The string contains the word "Payments" so that's why the error says that. There is now a bug with match as well as isFilter. I now have to resort to fetching all of the objects and doing a local filter. |
Neither one of them is a bug, but how SQL works, and Supabase and PostgREST are just adhering to how Postgres works. If anything, it's just a lack of assertion and documentation for people who are less familiar with how SQL works. You can learn more about how the In your case, you have to conditionally apply either the |
Right so I understand that SQL you would say
|
The |
Describe the bug
When performing a select, I would like to include the equivalent of "where columnName is null". There are two options for where clause in Supabase flutter:
Supabase.instance.client.from('my_table').select('column_one, column_two').eq('column_three, null);
Supabase.instance.client.from('my_table').select('column_one, column_two').eq('column_three, null);
Returns 0 values even though running the equivalent query in Supabase SQL Editor returns results. Select eq with a value for column_three also returns all of the values. Only null returns no values.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I should be able to select where null. The workaround now is that I have to fetch all of the values and filter for null on the client.
Version (please complete the following information):
On Linux/macOS
Please run
dart pub deps | grep -E "supabase|gotrue|postgrest|storage_client|realtime_client|functions_client"
in your project directory and paste the output here.── supabase_flutter 2.5.2
│ ├── supabase 2.1.2
│ │ ├── functions_client 2.1.0
│ │ ├── gotrue 2.6.1
│ │ ├── postgrest 2.1.1
│ │ ├── realtime_client 2.0.4
│ │ ├── storage_client 2.0.1
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: