Any idea by chance what that would look like?
# off-topic
j
Any idea by chance what that would look like?
g
query = supabase.from("users").select("*")
query = query.eq()
if (array.length>0) query = query.in(col,array)
let {data,....} = await query
the query does not run until you do await or .then so you can build it up in steps
j
ooooooooh! Look at that!
I'll give that a try!
m
@garyaustin Is this possible to do in Dart/Flutter? The official documentation for JS has this section but for dart, this section is missing: https://supabase.com/docs/reference/javascript/using-filters#conditional-chaining
g
Sorry, just saw this. I assume flutter has a similar approach, but I'm really not sure.
Maybe you pursued this else where, but I see this fix to flutter docs today: https://github.com/supabase/supabase/pull/10021/files
m
No worries. Someone else helped me out and clarified that conditional queries work in the same way in dart as in JS. Its just that the documentation does not have the relevant section (i.e. it exists in JS docs but not in dart docs).