findJoinedRecords<JK extends SdbKey, JV extends SdbValue> method

Future<List<SdbRecordSnapshot<JK, JV>>> findJoinedRecords<JK extends SdbKey, JV extends SdbValue>(
  1. SdbClient client, {
  2. required SdbJoinTarget<JK, JV> target,
  3. SdbFindOptions<SK>? options,
  4. SdbJoinFindOptions? joinOptions,
})

The records joinIterateJoinedRecords would hand out, as a list.

Implementation

Future<List<SdbRecordSnapshot<JK, JV>>>
findJoinedRecords<JK extends SdbKey, JV extends SdbValue>(
  SdbClient client, {
  required SdbJoinTarget<JK, JV> target,
  SdbFindOptions<SK>? options,
  SdbJoinFindOptions? joinOptions,
}) async {
  var records = <SdbRecordSnapshot<JK, JV>>[];
  await joinIterateJoinedRecords<JK, JV>(
    client,
    target: target,
    options: options,
    joinOptions: joinOptions,
    onRecord: (record) {
      records.add(record);
      return true;
    },
  );
  return records;
}