SembastRecordRefExtension<K, V> extension

Record ref sembast public extension.

Provides access helper to data on the store using a given DatabaseClient.

on

Methods

add(DatabaseClient databaseClient, V value) Future<K?>
Create the record if it does not exist.
delete(DatabaseClient databaseClient) Future<K?>
Delete the record. Returns the key if deleted, null if not found.
exists(DatabaseClient databaseClient) Future<bool>
Return true if the record exists.
get(DatabaseClient databaseClient) Future<V?>
Get a record value from the database.
getSnapshot(DatabaseClient databaseClient) Future<RecordSnapshot<K, V>?>
Get a record snapshot from the database.
onSnapshot(Database database) Stream<RecordSnapshot<K, V>?>
Get a stream of a record snapshot from the database.
put(DatabaseClient databaseClient, V value, {bool? merge, bool? ifNotExists}) Future<V>
Save a record, create if needed.
snapshot(V value) RecordSnapshot<K, V>
Create a snapshot of a record with a given value.
update(DatabaseClient databaseClient, V value) Future<V?>
Update a record.