Flutter: Update data

Perform an UPDATE on the table or view.

Examples

Update your data

await supabase
  .from('cities')
  .update(\{ 'name': 'Middle Earth' \})
  .match(\{ 'name': 'Auckland' \});

Update JSON data

await supabase
  .from('users')
  .update(\{
    'address': \{
      'street': 'Melrose Place',
      'postcode': 90210
    \}
  \})
  .eq('address->postcode', 90210);

Fetch updated rows

final List<Map<String, dynamic>> data = await supabase
    .from('users')
    .update(\{
      'address': \{'street': 'Melrose Place', 'postcode': 90210\}
    \})
    .eq('address->postcode', 90210)
    .select();