findRecord method

Future<SdbRecordSnapshot<K, V>?> findRecord(
  1. SdbClient client, {
  2. SdbBoundaries<K>? boundaries,
  3. SdbFilter? filter,
  4. int? offset,
  5. bool? descending,
})

Find firest records

Implementation

Future<SdbRecordSnapshot<K, V>?> findRecord(
  SdbClient client, {

  SdbBoundaries<K>? boundaries,

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

  /// Optional sort order
  bool? descending,
}) async {
  var records = await findRecords(
    client,
    boundaries: boundaries,
    filter: filter,
    offset: offset,
    limit: 1,
    descending: descending,
  );
  return records.firstOrNull;
}