add method
- DatabaseClient databaseClient,
- V value
Create the record if it does not exist.
Returns the key if inserted, null otherwise.
Implementation
Future<K> add(DatabaseClient databaseClient, V value) async {
var client = getClient(databaseClient);
value = client.sembastDatabase.sanitizeInputValue<V>(value);
return await client.inTransaction((txn) {
return client.getSembastStore(store).txnAdd(txn, value, key);
});
}