update method

PostgrestFilterBuilder update(
  1. Map values, {
  2. ReturningOption returning = ReturningOption.representation,
})

Performs an UPDATE on the table.

By default the updated record(s) will be returned. Set returning to minimal if you don't need this value.

postgrest.from('messages').update({'channel_id': 2}).eq('message', 'foo')

Implementation

PostgrestFilterBuilder update(
  Map values, {
  ReturningOption returning = ReturningOption.representation,
}) {
  method = 'PATCH';
  headers['Prefer'] = 'return=${returning.name()}';
  body = values;
  return PostgrestFilterBuilder(this);
}