put method
Save a record, create if needed.
if merge
is true and the field exists, data is merged
Returns the updated value.
Implementation
Future<V> put(DatabaseClient databaseClient, V value, {bool? merge}) async {
var client = getClient(databaseClient);
_checkValueArgument(value);
value = client.sembastDatabase
.sanitizeInputValue<V>(value as Value, update: merge);
return (await client.inTransaction((txn) {
return client
.getSembastStore(store)
.txnPut(txn, value as Value, key as Key, merge: merge);
}) as V?)!;
}