update method
- DatabaseClient databaseClient,
- V value,
- {Finder finder}
Update records matching a given finder.
Return the count updated. value
is merged to the existing.
Implementation
Future<int> update(DatabaseClient databaseClient, V value, {Finder finder}) {
final client = getClient(databaseClient);
value = client.sembastDatabase.sanitizeInputValue<V>(value, update: true);
return client.inTransaction((txn) async {
return (await client
.getSembastStore(this)
.txnUpdateWhere(txn, value, finder: finder))
.length;
});
}