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.
Constructors
- SdbStoreRef(String name)
-
Store definition.
factory
Properties
-
asJoinSource
→ SdbJoinSource<
K, V, K> -
Available on SdbStoreRef<
This store as a join source, walked in primary key order, its primary key being the join key.K, V> , provided by the SdbStoreRefJoinSourceExtension extensionno setter -
asJoinTarget
→ SdbJoinTarget<
JK, JV> -
Available on SdbStoreRef<
This store as a join target, matched on its primary key.JK, JV> , provided by the SdbStoreRefJoinTargetExtension extensionno 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<
Add a single record.K, V> , provided by the SdbStoreRefDbExtension extension -
addOnChangesListener(
SdbDatabase database, SdbTransactionRecordChangeListener< K, V> onChanges, {List<String> ? extraStoreNames}) → void -
Available on SdbStoreRef<
Listen for changes on a given store.K, V> , provided by the SdbStoreRefDbExtension extension -
asJoinSourceAt(
String joinKeyPath) → SdbJoinSource< K, V, K> -
Available on SdbStoreRef<
This store as a join source, walked in primary key order, the join key being the value atK, V> , provided by the SdbStoreRefJoinSourceExtension extensionjoinKeyPath. -
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<
Count records.K, V> , provided by the SdbStoreRefDbExtension extension -
delete(
SdbClient client, {SdbBoundaries< K> ? boundaries, int? offset, int? limit, bool? descending, SdbFindOptions<K> ? options}) → Future<void> -
Available on SdbStoreRef<
Delete records.K, V> , provided by the SdbStoreRefDbExtension extension -
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<
See SdbJoinSourceExtension.findJoinedRecords.K, V> , provided by the SdbStoreRefJoinExtension extension -
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<
See SdbJoinSourceExtension.findJoinRecords.K, V> , provided by the SdbStoreRefJoinExtension extension -
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<
See SdbJoinSourceExtension.findJoinRows.K, V> , provided by the SdbStoreRefJoinExtension extension -
findRecord(
SdbClient client, {SdbBoundaries< K> ? boundaries, SdbFilter? filter, int? offset, bool? descending, SdbFindOptions<K> ? options}) → Future<SdbRecordSnapshot< K, V> ?> -
Available on SdbStoreRef<
Find first recordsK, V> , provided by the SdbStoreRefDbExtension extension -
findRecordKeys(
SdbClient client, {SdbBoundaries< K> ? boundaries, int? offset, int? limit, bool? descending, SdbFindOptions<K> ? options}) → Future<List< SdbRecordKey< >K, V> > -
Available on SdbStoreRef<
Find records.K, V> , provided by the SdbStoreRefDbExtension extension -
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<
Find records.K, V> , provided by the SdbStoreRefDbExtension extension -
index<
I extends SdbIndexKey> (String name) → SdbIndex1Ref< K, V, I> -
Available on SdbStoreRef<
Index reference on 1 fieldK, V> , provided by the SdbStoreRefExtension extension -
index2<
I1 extends SdbIndexKey, I2 extends SdbIndexKey> (String name) → SdbIndex2Ref< K, V, I1, I2> -
Available on SdbStoreRef<
Index reference on 2 fieldsK, V> , provided by the SdbStoreRefExtension extension -
index3<
I1 extends SdbIndexKey, I2 extends SdbIndexKey, I3 extends SdbIndexKey> (String name) → SdbIndex3Ref< K, V, I1, I2, I3> -
Available on SdbStoreRef<
Index reference on 3 fieldsK, V> , provided by the SdbStoreRefExtension extension -
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<
Index reference on 4 fieldsK, V> , provided by the SdbStoreRefExtension extension -
iterate(
SdbClient client, {SdbTransactionMode? mode, SdbFindOptions< K> ? options, required SdbCursorRowHandler<K, V> onRow}) → Future<void> -
Available on SdbStoreRef<
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.K, V> , provided by the SdbStoreRefDbExtension extension -
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<
See SdbJoinSourceExtension.joinCount.K, V> , provided by the SdbStoreRefJoinExtension extension -
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<
See SdbJoinSourceExtension.joinIterate.K, V> , provided by the SdbStoreRefJoinExtension extension -
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<
See SdbJoinSourceExtension.joinIterateJoinedRecords.K, V> , provided by the SdbStoreRefJoinExtension extension -
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<
See SdbJoinSourceExtension.joinIterateRecords.K, V> , provided by the SdbStoreRefJoinExtension extension -
lowerBoundary(
K value, {bool? include = true}) → SdbBoundary< K> -
Available on SdbStoreRef<
Lower boundaryK, V> , provided by the SdbStoreRefExtension extension -
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<
Reads the count and set a listener to redo the count on changes, including changes made in other browser tabs.K, V> , provided by the SdbStoreRefExtensionOnSnapshots extension -
onSnapshots(
SdbDatabase db, {SdbFindOptions< K> ? options}) → Stream<List< SdbRecordSnapshot< >K, V> > -
Available on SdbStoreRef<
Reads the data and set a listener to redo the query on changes, including changes made in other browser tabs.K, V> , provided by the SdbStoreRefExtensionOnSnapshots extension -
put(
SdbClient client, V value) → Future< K> -
Available on SdbStoreRef<
Put a single record (when using inline keys)K, V> , provided by the SdbStoreRefDbExtension extension -
record(
K key) → SdbRecordRef< K, V> -
Available on SdbStoreRef<
Record reference.K, V> , provided by the SdbStoreRefExtension extension -
records(
Iterable< K> keys) → List<SdbRecordRef< K, V> > -
Available on SdbStoreRef<
Create a reference to multiple recordsK, V> , provided by the SdbStoreRefExtension extension -
removeOnChangesListener(
SdbDatabase database, SdbTransactionRecordChangeListener< K, V> onChanges) → void -
Available on SdbStoreRef<
Stop listening for changes.K, V> , provided by the SdbStoreRefDbExtension extension -
schema(
{SdbKeyPath? keyPath, bool? autoIncrement, List< SdbIndexSchema> ? indexes}) → SdbStoreSchema -
Available on SdbStoreRef<
Create store schemaSdbKey, SdbValue> , provided by the SdbStoreRefSchemaExtension extension -
streamRecords(
SdbClient client, {SdbBoundaries< K> ? boundaries, SdbFilter? filter, int? offset, int? limit, bool? descending, SdbFindOptions<K> ? options}) → Stream<SdbRecordSnapshot< K, V> > -
Available on SdbStoreRef<
Find records.K, V> , provided by the SdbStoreRefDbExtension extension -
toString(
) → String -
A string representation of this object.
inherited
-
upperBoundary(
K value, {bool? include = false}) → SdbBoundary< K> -
Available on SdbStoreRef<
Upper boundaryK, V> , provided by the SdbStoreRefExtension extension
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited