StoreRef<K extends Key?, V extends Value?> class abstract

A pointer to a store.

Available extensions

Constructors

StoreRef(String name)
A null name means a the main store.
factory
StoreRef.main()
A pointer to the main store
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
name → String
The name of the store
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(DatabaseClient databaseClient, V value) → Future<K>

Available on StoreRef<K, V>, provided by the SembastStoreRefExtension extension

Add a record, returns its generated key.
addAll(DatabaseClient databaseClient, List<V> values) → Future<List<K>>

Available on StoreRef<K, V>, provided by the SembastStoreRefExtension extension

Add multiple records, returns the list of generated keys.
addOnChangesListener(Database database, TransactionRecordChangeListener<K, V> onChanges) → void

Available on StoreRef<K, V>, provided by the SembastStoreRefExtension extension

Listen for changes on a given store.
cast<RK extends Key?, RV extends Value?>() → StoreRef<RK, RV>
Cast if needed
count(DatabaseClient databaseClient, {Filter? filter}) → Future<int>

Available on StoreRef<K, V>, provided by the SembastStoreRefExtension extension

count records.
countSync(DatabaseClient databaseClient, {Filter? filter}) → int

Available on StoreRef<K, V>, provided by the SembastStoreRefSyncExtension extension

count records.
delete(DatabaseClient databaseClient, {Finder? finder}) → Future<int>

Available on StoreRef<K, V>, provided by the SembastStoreRefExtension extension

Delete records matching a given finder.
drop(DatabaseClient databaseClient) → Future<void>

Available on StoreRef<K, V>, provided by the SembastStoreRefExtension extension

Delete the store and its content
find(DatabaseClient databaseClient, {Finder? finder}) → Future<List<RecordSnapshot<K, V>>>

Available on StoreRef<K, V>, provided by the SembastStoreRefExtension extension

Find multiple records.
findFirst(DatabaseClient databaseClient, {Finder? finder}) → Future<RecordSnapshot<K, V>?>

Available on StoreRef<K, V>, provided by the SembastStoreRefExtension extension

Find a single record.
findFirstSync(DatabaseClient databaseClient, {Finder? finder}) → RecordSnapshot<K, V>?

Available on StoreRef<K, V>, provided by the SembastStoreRefSyncExtension extension

Find a single record.
findKey(DatabaseClient databaseClient, {Finder? finder}) → Future<K?>

Available on StoreRef<K, V>, provided by the SembastStoreRefExtension extension

Find one key.
findKeys(DatabaseClient databaseClient, {Finder? finder}) → Future<List<K>>

Available on StoreRef<K, V>, provided by the SembastStoreRefExtension extension

Find multiple keys.
findKeysSync(DatabaseClient databaseClient, {Finder? finder}) → List<K>

Available on StoreRef<K, V>, provided by the SembastStoreRefSyncExtension extension

Find multiple keys.
findKeySync(DatabaseClient databaseClient, {Finder? finder}) → K?

Available on StoreRef<K, V>, provided by the SembastStoreRefSyncExtension extension

Find one key.
findSync(DatabaseClient databaseClient, {Finder? finder}) → List<RecordSnapshot<K, V>>

Available on StoreRef<K, V>, provided by the SembastStoreRefSyncExtension extension

Find multiple records. Synchronous access.
generateIntKey(DatabaseClient databaseClient) → Future<int>

Available on StoreRef<K, V>, provided by the SembastStoreRefExtension extension

Generate a new int key.
generateKey(DatabaseClient databaseClient) → Future<K>

Available on StoreRef<K, V>, provided by the SembastStoreRefExtension extension

Generate a new key.
immutableListToSnapshots(List<ImmutableSembastRecord> records) → List<SembastRecordSnapshot<K, V>>

Available on StoreRef<K, V>, provided by the SembastStoreRefExtension extension

create snapshot list.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCount(Database database, {Filter? filter}) → Stream<int>

Available on StoreRef<K, V>, provided by the SembastStoreRefExtension extension

onCount stream, called when the number of items changes.
query({Finder? finder}) → QueryRef<K, V>

Available on StoreRef<K, V>, provided by the SembastStoreRefExtension extension

Create a query with a finder.
record(K key) → RecordRef<K, V>
Create a record reference.
records(Iterable<K> keys) → RecordsRef<K, V>
Create a reference to multiple records
recordsFromRefs(List<RecordRef<K, V>> refs) → RecordsRef<K, V>

Available on StoreRef<K, V>, provided by the SembastStoreRefCommonExtension extension

Records ref from a list of record refs.
removeOnChangesListener(Database database, TransactionRecordChangeListener<K, V> onChanges) → void

Available on StoreRef<K, V>, provided by the SembastStoreRefExtension extension

Stop listening for changes.
stream(DatabaseClient databaseClient, {Filter? filter}) → Stream<RecordSnapshot<K, V>>

Available on StoreRef<K, V>, provided by the SembastStoreRefExtension extension

Unsorted record stream
toString() → String
A string representation of this object.
inherited
update(DatabaseClient databaseClient, V value, {Finder? finder}) → Future<int>

Available on StoreRef<K, V>, provided by the SembastStoreRefExtension extension

Update records matching a given finder.

Operators

operator ==(Object other) → bool
The equality operator.
inherited