I want to write an SELECT statement using Supabase-JS library, where it would return all rows whose associated_campaigns
(array of UUIDs) column is either null
or doesn’t contain input string.
I’m trying with something like this, where campaign_id
is input parameter, but without success:
supabase.from("linkedin_leads").select("*").or(`associated_campaigns.is.null,not(associated_campaigns.cs.${campaign_id})`);
Error returned is:
"failed to parse logic tree ((associated_campaigns.is.null,not(associated_campaigns.cs.e04a95fc-47bd-4c88-8e97-ad48711ee8d9)))"
2
Answers
Looking at the docs for
contains
, it looks like you might have to wrap yourcampaign_id
in{}
like this:For the python user (#supabase-py), you can use :