findRecord method
Future<SdbRecordSnapshot<K, V> ?>
findRecord(
- SdbClient client, {
- SdbBoundaries<
K> ? boundaries, - SdbFilter? filter,
- int? offset,
- bool? descending,
- SdbFindOptions<
K> ? options,
Find first 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,
/// New API, supercedes the other parameters
SdbFindOptions<K>? options,
}) async {
options = sdbFindOptionsMerge(
options,
boundaries: boundaries,
offset: offset,
descending: descending,
filter: filter,
);
options = options.copyWith(limit: 1);
var records = await findRecords(client, options: options);
return records.firstOrNull;
}