.or()
Finds all rows satisfying at least one of the filters.
final res = await supabase
.from('cities')
.select('name, country_id')
.or('id.eq.20,id.eq.30')
.execute();
Notes
.or()
expects you to use the raw PostgREST syntax for the filter names and values..or('id.in.(6,7),arraycol.cs.{"a","b"}') // Use Postgres list () and 'in' for in_ filter. Array {} and 'cs' for contains.
.or('id.in.(${mylist.join(',')}),arraycol.cs.{${mylistArray.join(',')}}') // You can insert a Dart list for list or array column.
.or('id.in.(${mylist.join(',')}),rangecol.cs.(${mylistRange.join(',')}]') // You can insert a Dart list for list or range column.
Examples
With select()
final res = await supabase
.from('cities')
.select('name, country_id')
.or('id.eq.20,id.eq.30')
.execute();
Use or
with and
final res = await supabase
.from('cities')
.select('name, country_id')
.or('id.gt.20,and(name.eq.New Zealand,name.eq.France)')
.execute();