SembastStoreRefExtension<K, V> extension
Store ref public sembast extension.
Provides access helper to data on the store using a given DatabaseClient.
- on
-
- StoreRef<
K, V>
- StoreRef<
Methods
-
add(
DatabaseClient databaseClient, V value) → Future< K> - Add a record, returns its generated key.
-
addAll(
DatabaseClient databaseClient, List< V> values) → Future<List< K> > - Add multiple records, returns the list of generated keys.
-
addOnChangesListener(
Database database, TransactionRecordChangeListener< K, V> onChanges) → void - Listen for changes on a given store.
-
count(
DatabaseClient databaseClient, {Filter? filter}) → Future< int> - count records.
-
delete(
DatabaseClient databaseClient, {Finder? finder}) → Future< int> - Delete records matching a given finder.
-
drop(
DatabaseClient databaseClient) → Future - Delete the store and its content
-
find(
DatabaseClient databaseClient, {Finder? finder}) → Future< List< RecordSnapshot< >K, V> > - Find multiple records.
-
findFirst(
DatabaseClient databaseClient, {Finder? finder}) → Future< RecordSnapshot< K, V> ?> - Find a single record.
-
findKey(
DatabaseClient databaseClient, {Finder? finder}) → Future< K?> - Find one key.
-
findKeys(
DatabaseClient databaseClient, {Finder? finder}) → Future< List< K> > - Find multiple keys.
-
generateIntKey(
DatabaseClient databaseClient) → Future< int> - Generate a new int key.
-
generateKey(
DatabaseClient databaseClient) → Future< K> - Generate a new key.
-
onCount(
Database database, {Filter? filter}) → Stream< int> - onCount stream, called when the number of items changes.
-
query(
{Finder? finder}) → QueryRef< K, V> - Create a query with a finder.
-
removeOnChangesListener(
Database database, TransactionRecordChangeListener< K, V> onChanges) → void - Stop listening for changes.
-
stream(
DatabaseClient databaseClient, {Filter? filter}) → Stream< RecordSnapshot< K, V> > - Unsorted record stream
-
update(
DatabaseClient databaseClient, V value, {Finder? finder}) → Future< int> - Update records matching a given finder.