findRecordKey method

Future<SdbIndexRecordKey<K, V, I>?> findRecordKey(
  1. SdbClient client, {
  2. SdbBoundaries<I>? boundaries,
  3. SdbFilter? filter,
  4. int? offset,
  5. bool? descending,
  6. SdbFindOptions<I>? options,
})

Find first record key.

Implementation

Future<SdbIndexRecordKey<K, V, I>?> findRecordKey(
  SdbClient client, {
  SdbBoundaries<I>? boundaries,

  /// Optional filter, performed in memory
  SdbFilter? filter,
  int? offset,

  /// Optional descending order
  bool? descending,

  /// New API, supersedes the other parameters
  SdbFindOptions<I>? options,
}) async {
  options = sdbFindOptionsMerge(
    options,
    limit: null,
    filter: filter,
    boundaries: boundaries,
    offset: offset,
    descending: descending,
  ).copyWith(limit: 1);
  var records = await findRecordKeys(client, options: options);
  return records.firstOrNull;
}