add method
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 as Value);
return await client.inTransaction((txn) {
return client.getSembastStore(store).txnAdd<K>(txn, value as Value, key);
});
}