.not()
找到所有不符合过滤器要求的行。
1final data = await supabase 2 .from('cities') 3 .select('name, country_id') 4 .not('name', 'eq', 'Paris');
Notes#
.not()
希望你使用原始的PostgREST语法作为过滤器的名称和值。1.not('name','eq','Paris') 2.not('arraycol','cs','{"a","b"}') // Use Postgres array {} for array column and 'cs' for contains. 3.not('rangecol','cs','(1,2]') // Use Postgres range syntax for range column. 4.not('id','in','(6,7)') // Use Postgres list () and 'in' for in_ filter. 5.not('id','in','(${mylist.join(',')})') // You can insert a Dart list array.
Examples#
使用 select()
#
1final data = await supabase 2 .from('cities') 3 .select('name, country_id') 4 .not('name', 'eq', 'Paris');
使用 update()
#
1final data = await supabase 2 .from('cities') 3 .update({ 'name': 'Mordor' }) 4 .not('name', 'eq', 'Paris');
使用 delete()
#
1final data = await supabase 2 .from('cities') 3 .delete() 4 .not('name', 'eq', 'Paris');
使用 rpc()
#
1// Only valid if the Stored Procedure returns a table type. 2final data = await supabase 3 .rpc('echo_all_cities) 4 .not('name', 'eq', 'Paris');