SdbJoinSource<K extends SdbKey, V extends SdbValue, SK extends SdbKey> class abstract

What a join iterates, and where it reads the join key of each record.

Either a store, in primary key order, or an index, in index key order. The mirror of SdbJoinTarget: a join is one source and one target, and every join method takes both.

The third type parameter is the key the iteration is ordered and bounded by: the primary key of a store, the index key of an index. It is what SdbFindOptions applies to, so the boundaries of a join always have the type of the key that is actually walked.

Build one with the asJoinSource getter on a store or an index, or with asJoinSourceAt on a store to read the join key from a field:

bookStore.asJoinSourceAt('authorId') // store, join key in a field
postStore.asJoinSource               // store, join key is its primary key
bookAuthorIndex.asJoinSource         // index, join key is its index key
Available extensions

Constructors

SdbJoinSource()

Properties

hashCode → int
The hash code for this object.
no setterinherited
index → SdbIndexRef<K, V, SdbIndexKey>?
The index the records are walked through, null when store is walked in primary key order.
no setter
joinKeyPath → String?
Field path holding the join key, null when the key the iteration is ordered by is the join key.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
store → SdbStoreRef<K, V>
The store holding the iterated records, whichever way they are walked.
no setter

Methods

countRecords(SdbClient client, SdbFindOptions<SK>? options) → Future<int>
Internal: the number of records options selects, without any join.
findJoinedRecords<JK extends SdbKey, JV extends SdbValue>(SdbClient client, {required SdbJoinTarget<JK, JV> target, SdbFindOptions<SK>? options, SdbJoinFindOptions? joinOptions}) → Future<List<SdbRecordSnapshot<JK, JV>>>

Available on SdbJoinSource<K, V, SK>, provided by the SdbJoinSourceExtension extension

The records joinIterateJoinedRecords would hand out, as a list.
findJoinRecords<JK extends SdbKey, JV extends SdbValue>(SdbClient client, {required SdbJoinTarget<JK, JV> target, SdbFindOptions<SK>? options, SdbJoinFindOptions? joinOptions}) → Future<List<SdbRecordSnapshot<K, V>>>

Available on SdbJoinSource<K, V, SK>, provided by the SdbJoinSourceExtension extension

The records joinIterateRecords would hand out, as a list.
findJoinRows<JK extends SdbKey, JV extends SdbValue>(SdbClient client, {required SdbJoinTarget<JK, JV> target, SdbFindOptions<SK>? options, SdbJoinFindOptions? joinOptions}) → Future<List<SdbJoinRow<K, V, JK, JV>>>

Available on SdbJoinSource<K, V, SK>, provided by the SdbJoinSourceExtension extension

The rows joinIterate would hand out, as a list.
joinCount<JK extends SdbKey, JV extends SdbValue>(SdbClient client, {required SdbJoinTarget<JK, JV> target, SdbFindOptions<SK>? options, SdbJoinFindOptions? joinOptions}) → Future<int>

Available on SdbJoinSource<K, V, SK>, provided by the SdbJoinSourceExtension extension

The number of rows joinIterate would hand out.
joinIterate<JK extends SdbKey, JV extends SdbValue>(SdbClient client, {required SdbJoinTarget<JK, JV> target, SdbTransactionMode? mode, SdbFindOptions<SK>? options, SdbJoinFindOptions? joinOptions, required SdbJoinRowHandler<K, V, JK, JV> onRow}) → Future<void>

Available on SdbJoinSource<K, V, SK>, provided by the SdbJoinSourceExtension extension

Iterate the records of this source, each with the record(s) it references.
joinIterateJoinedRecords<JK extends SdbKey, JV extends SdbValue>(SdbClient client, {required SdbJoinTarget<JK, JV> target, SdbTransactionMode? mode, SdbFindOptions<SK>? options, SdbJoinFindOptions? joinOptions, required SdbJoinRecordHandler<JK, JV> onRecord}) → Future<void>

Available on SdbJoinSource<K, V, SK>, provided by the SdbJoinSourceExtension extension

Iterate the records this source references, without reading the source records.
joinIterateRecords<JK extends SdbKey, JV extends SdbValue>(SdbClient client, {required SdbJoinTarget<JK, JV> target, SdbTransactionMode? mode, SdbFindOptions<SK>? options, SdbJoinFindOptions? joinOptions, required SdbJoinRecordHandler<K, V> onRecord}) → Future<void>

Available on SdbJoinSource<K, V, SK>, provided by the SdbJoinSourceExtension extension

Iterate the records of this source taking part in the join, without reading the records they reference.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sourceBoundariesOf(SdbFindOptions<SK>? options) → SdbBoundaries<K>?
Internal: the boundaries to hand to the store scan, null when walking an index (the boundaries then apply to the index key, and only reach the scan as a resolved range).
toString() → String
A string representation of this object.
inherited

Operators

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