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?>

Available on RecordRef<K, V>, provided by the SembastRecordRefExtension extension

Create the record if it does not exist.
delete(DatabaseClient databaseClient) Future<K?>

Available on RecordRef<K, V>, provided by the SembastRecordRefExtension extension

Delete the record. Returns the key if deleted, null if not found.
exists(DatabaseClient databaseClient) Future<bool>

Available on RecordRef<K, V>, provided by the SembastRecordRefExtension extension

Return true if the record exists.
get(DatabaseClient databaseClient) Future<V?>

Available on RecordRef<K, V>, provided by the SembastRecordRefExtension extension

Get a record value from the database.
getSnapshot(DatabaseClient databaseClient) Future<RecordSnapshot<K, V>?>

Available on RecordRef<K, V>, provided by the SembastRecordRefExtension extension

Get a record snapshot from the database.
onSnapshot(Database database) Stream<RecordSnapshot<K, V>?>

Available on RecordRef<K, V>, provided by the SembastRecordRefExtension extension

Get a stream of a record snapshot from the database.
put(DatabaseClient databaseClient, V value, {bool? merge, bool? ifNotExists}) Future<V>

Available on RecordRef<K, V>, provided by the SembastRecordRefExtension extension

Save a record, create if needed.
snapshot(V value) RecordSnapshot<K, V>

Available on RecordRef<K, V>, provided by the SembastRecordRefExtension extension

Create a snapshot of a record with a given value.
update(DatabaseClient databaseClient, V value) Future<V?>

Available on RecordRef<K, V>, provided by the SembastRecordRefExtension extension

Update a record.