joinIterateRecords<JK extends SdbKey, JV extends SdbValue> method

Future<void> joinIterateRecords<JK extends SdbKey, JV extends SdbValue>(
  1. SdbClient client, {
  2. required SdbJoinTarget<JK, JV> target,
  3. SdbTransactionMode? mode,
  4. SdbFindOptions<SK>? options,
  5. SdbJoinFindOptions? joinOptions,
  6. required SdbJoinRecordHandler<K, V> onRecord,
})

Iterate the records of this source taking part in the join, without reading the records they reference.

One record per source record, however many rows it would give: joining on an index, a record matching three records is handed out once, not three times. options.offset and options.limit apply to the records handed out.

With inner: true this is a semi join, an sql WHERE EXISTS: only the records whose join key matches something are handed out.

Implementation

Future<void> 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,
}) => _joinRun<JK, JV>(
  client,
  target: target,
  mode: mode,
  options: options,
  joinOptions: joinOptions,
  emit: SdbJoinEmit.sourceRecords,
  onEmit: (row) => onRecord(row.record!),
);