Perform a DELETE on the table or view.
delete()
should always be combined with Filters to target the item(s) you wish to delete.delete()
with filters and you have RLS enabled, only rows visible through SELECT
policies are deleted. Note that by default no rows are visible, so you need at least one SELECT
/ALL
policy that makes the rows visible.await supabase
.from('countries')
.delete()
.eq('id', 1);
await supabase
.from('countries')
.delete()
.inFilter('id', [1, 2, 3])
final List<Map<String,dynamic>> data = await supabase
.from('cities')
.delete()
.match(\{ 'id': 666 \})
.select();