update method
Applies changes to the records where picks, and answers how many.
An optimistic write names the version it read in where; nought
changed is the conflict.
Implementation
@override
Future<int> update(
String collection,
Map<String, Object?> changes, {
required DVFilter where,
}) {
_refuseEverything(where, 'update');
final List<Object?> params = changes.values.map(_value).toList();
final String assignments = changes.keys
.map((String k) => '${_name(k)} = ?')
.join(', ');
return _execute(
'UPDATE ${_collection(collection)} SET $assignments${_where(where, params)}',
params,
);
}