SdbStoreRef<K extends SdbKey, V extends SdbValue> class abstract

A reference to a store.

A store is a collection of records. A store has a name.

A store can be created using SdbDatabase.inTransaction and SdbTransactionExtension.store.

Available extensions

Constructors

SdbStoreRef(String name)
Store definition.
factory

Properties

asJoinSource SdbJoinSource<K, V, K>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefJoinSourceExtension extension

This store as a join source, walked in primary key order, its primary key being the join key.
no setter
asJoinTarget SdbJoinTarget<JK, JV>

Available on SdbStoreRef<JK, JV>, provided by the SdbStoreRefJoinTargetExtension extension

This store as a join target, matched on its primary key.
no setter
hashCode int
The hash code for this object.
no setterinherited
name String
Store name.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(SdbClient client, V value) Future<K>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefDbExtension extension

Add a single record.
addOnChangesListener(SdbDatabase database, SdbTransactionRecordChangeListener<K, V> onChanges, {List<String>? extraStoreNames}) → void

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefDbExtension extension

Listen for changes on a given store.
asJoinSourceAt(String joinKeyPath) SdbJoinSource<K, V, K>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefJoinSourceExtension extension

This store as a join source, walked in primary key order, the join key being the value at joinKeyPath.
cast<RK extends SdbKey, RV extends SdbValue>() SdbStoreRef<RK, RV>
Cast if needed
count(SdbClient client, {SdbBoundaries<K>? boundaries, SdbFindOptions<K>? options}) Future<int>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefDbExtension extension

Count records.
delete(SdbClient client, {SdbBoundaries<K>? boundaries, int? offset, int? limit, bool? descending, SdbFindOptions<K>? options}) Future<void>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefDbExtension extension

Delete records.
findJoinedRecords<JK extends SdbKey, JV extends SdbValue>(SdbClient client, {required SdbJoinTarget<JK, JV> target, String? joinKeyPath, SdbFindOptions<K>? options, SdbJoinFindOptions? joinOptions}) Future<List<SdbRecordSnapshot<JK, JV>>>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefJoinExtension extension

See SdbJoinSourceExtension.findJoinedRecords.
findJoinRecords<JK extends SdbKey, JV extends SdbValue>(SdbClient client, {required SdbJoinTarget<JK, JV> target, String? joinKeyPath, SdbFindOptions<K>? options, SdbJoinFindOptions? joinOptions}) Future<List<SdbRecordSnapshot<K, V>>>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefJoinExtension extension

See SdbJoinSourceExtension.findJoinRecords.
findJoinRows<JK extends SdbKey, JV extends SdbValue>(SdbClient client, {required SdbJoinTarget<JK, JV> target, String? joinKeyPath, SdbFindOptions<K>? options, SdbJoinFindOptions? joinOptions}) Future<List<SdbJoinRow<K, V, JK, JV>>>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefJoinExtension extension

See SdbJoinSourceExtension.findJoinRows.
findRecord(SdbClient client, {SdbBoundaries<K>? boundaries, SdbFilter? filter, int? offset, bool? descending, SdbFindOptions<K>? options}) Future<SdbRecordSnapshot<K, V>?>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefDbExtension extension

Find first records
findRecordKeys(SdbClient client, {SdbBoundaries<K>? boundaries, int? offset, int? limit, bool? descending, SdbFindOptions<K>? options}) Future<List<SdbRecordKey<K, V>>>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefDbExtension extension

Find records.
findRecords(SdbClient client, {SdbBoundaries<K>? boundaries, SdbFilter? filter, int? offset, int? limit, bool? descending, SdbFindOptions<K>? options}) Future<List<SdbRecordSnapshot<K, V>>>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefDbExtension extension

Find records.
index<I extends SdbIndexKey>(String name) SdbIndex1Ref<K, V, I>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefExtension extension

Index reference on 1 field
index2<I1 extends SdbIndexKey, I2 extends SdbIndexKey>(String name) SdbIndex2Ref<K, V, I1, I2>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefExtension extension

Index reference on 2 fields
index3<I1 extends SdbIndexKey, I2 extends SdbIndexKey, I3 extends SdbIndexKey>(String name) SdbIndex3Ref<K, V, I1, I2, I3>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefExtension extension

Index reference on 3 fields
index4<I1 extends SdbIndexKey, I2 extends SdbIndexKey, I3 extends SdbIndexKey, I4 extends SdbIndexKey>(String name) SdbIndex4Ref<K, V, I1, I2, I3, I4>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefExtension extension

Index reference on 4 fields
iterate(SdbClient client, {SdbTransactionMode? mode, SdbFindOptions<K>? options, required SdbCursorRowHandler<K, V> onRow}) Future<void>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefDbExtension extension

if client is a transaction it must match the transaction mode requiring write mode if the transaction is ready only will fail return true to continue iteration.
joinCount<JK extends SdbKey, JV extends SdbValue>(SdbClient client, {required SdbJoinTarget<JK, JV> target, String? joinKeyPath, SdbFindOptions<K>? options, SdbJoinFindOptions? joinOptions}) Future<int>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefJoinExtension extension

See SdbJoinSourceExtension.joinCount.
joinIterate<JK extends SdbKey, JV extends SdbValue>(SdbClient client, {required SdbJoinTarget<JK, JV> target, String? joinKeyPath, SdbTransactionMode? mode, SdbFindOptions<K>? options, SdbJoinFindOptions? joinOptions, required SdbJoinRowHandler<K, V, JK, JV> onRow}) Future<void>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefJoinExtension extension

See SdbJoinSourceExtension.joinIterate.
joinIterateJoinedRecords<JK extends SdbKey, JV extends SdbValue>(SdbClient client, {required SdbJoinTarget<JK, JV> target, String? joinKeyPath, SdbTransactionMode? mode, SdbFindOptions<K>? options, SdbJoinFindOptions? joinOptions, required SdbJoinRecordHandler<JK, JV> onRecord}) Future<void>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefJoinExtension extension

See SdbJoinSourceExtension.joinIterateJoinedRecords.
joinIterateRecords<JK extends SdbKey, JV extends SdbValue>(SdbClient client, {required SdbJoinTarget<JK, JV> target, String? joinKeyPath, SdbTransactionMode? mode, SdbFindOptions<K>? options, SdbJoinFindOptions? joinOptions, required SdbJoinRecordHandler<K, V> onRecord}) Future<void>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefJoinExtension extension

See SdbJoinSourceExtension.joinIterateRecords.
lowerBoundary(K value, {bool? include = true}) SdbBoundary<K>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefExtension extension

Lower boundary
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCount(SdbDatabase db, {SdbFindOptions<K>? options}) Stream<int>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefExtensionOnSnapshots extension

Reads the count and set a listener to redo the count on changes, including changes made in other browser tabs.
onSnapshots(SdbDatabase db, {SdbFindOptions<K>? options}) Stream<List<SdbRecordSnapshot<K, V>>>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefExtensionOnSnapshots extension

Reads the data and set a listener to redo the query on changes, including changes made in other browser tabs.
put(SdbClient client, V value) Future<K>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefDbExtension extension

Put a single record (when using inline keys)
record(K key) SdbRecordRef<K, V>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefExtension extension

Record reference.
records(Iterable<K> keys) List<SdbRecordRef<K, V>>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefExtension extension

Create a reference to multiple records
removeOnChangesListener(SdbDatabase database, SdbTransactionRecordChangeListener<K, V> onChanges) → void

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefDbExtension extension

Stop listening for changes.
schema({SdbKeyPath? keyPath, bool? autoIncrement, List<SdbIndexSchema>? indexes}) SdbStoreSchema

Available on SdbStoreRef<SdbKey, SdbValue>, provided by the SdbStoreRefSchemaExtension extension

Create store schema
streamRecords(SdbClient client, {SdbBoundaries<K>? boundaries, SdbFilter? filter, int? offset, int? limit, bool? descending, SdbFindOptions<K>? options}) Stream<SdbRecordSnapshot<K, V>>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefDbExtension extension

Find records.
toString() String
A string representation of this object.
inherited
upperBoundary(K value, {bool? include = false}) SdbBoundary<K>

Available on SdbStoreRef<K, V>, provided by the SdbStoreRefExtension extension

Upper boundary

Operators

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