update method
Update multiple records.
if value is a map, keys with dot values refer to a path in the map, unless the key is specifically escaped.
The list of values
must match the list of keys.
Returns the list of updated values, a value being null if the record does not exist.
Implementation
Future<List<V?>> update(DatabaseClient databaseClient, List<V> values) {
if (values.length != keys.length) {
throw ArgumentError('the list of values must match the list of keys');
}
var client = getClient(databaseClient);
return client.inTransaction((txn) async {
return (await client
.getSembastStore(store)
.txnUpdateAll(txn, values, keys))
.cast<V?>();
});
}