Query filter for not null
#1133
-
This is incredibly basic (apologies), but for some reason I can't figure out how to compose a query that gets non-null values in a column const { data: topRecipes } = await db
.from<IRecipeSearch>("recipe_searches")
.select("*")
.not("external_recipe_id", "eq", null)
--
const { data: topRecipes } = await db
.from<IRecipeSearch>("recipe_searches")
.select("*")
.neq("external_recipe_id", null) Neither of the above seem to be working - would appreciate any help here! Related: it would be nice to debug and see the query that SB is generating under the hood |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 22 replies
-
Actually the |
Beta Was this translation helpful? Give feedback.
-
Check the is() filter. |
Beta Was this translation helpful? Give feedback.
-
Is it possible to have a non empty value in supabase database. I see that by default an empty cell is considered as "null" ([null] in database) which is treated as null in dart. So I was wondering if there is a way to consider an empty cell as "" (empty string) by default when we create the column? |
Beta Was this translation helpful? Give feedback.
-
If you're doing this with a JSONB column, make sure you use
|
Beta Was this translation helpful? Give feedback.
-
I'm facing the same problem today (2023-07-07). Query: I'm trying to get the vehicles where the latitude is not null. .not('latitude','is',"null") .not('latitude','is',"") .neq('latitude',null) .neq('latitude', 'null') .neq('latitude', "") I also tried variations such as 'NULL' and 'Null'. |
Beta Was this translation helpful? Give feedback.
-
Hi to all, is there any other way to archive "is not null" without using "default to empty string"? |
Beta Was this translation helpful? Give feedback.
-
What is the idiomatic way to do this in the Python client? |
Beta Was this translation helpful? Give feedback.
-
It worked for me using |
Beta Was this translation helpful? Give feedback.
-
while yes |
Beta Was this translation helpful? Give feedback.
-
Hello, Is anyone getting timeout from on supabase when performing the is("column_name", null)? |
Beta Was this translation helpful? Give feedback.
Check the is() filter.