update method
Perform an UPDATE on the table or view.
By default no data is returned. Use a trailing select to return data.
Default (not returning data):
await supabase
.from('messages')
.update({'channel_id': 2})
.eq('message', 'foo');
Returning data:
await supabase
.from('messages')
.update({'channel_id': 2})
.eq('message', 'foo')
.select();
Implementation
PostgrestFilterBuilder<T> update(Map values) {
final newHeaders = {..._headers};
newHeaders['Prefer'] = '';
return PostgrestFilterBuilder<T>(_copyWith(
method: METHOD_PATCH,
headers: newHeaders,
body: values,
));
}