get method
Reads one key within the filters, or null. Rejects paging and sorting.
Implementation
Future<R?> get(Object id) async {
_rejectPaging();
final result = await whereFields({_primary.field: eq<Object?>(id)})
.limit(2)
.all();
if (result.length > 1) {
throw StateError('Primary key returned multiple rows');
}
return result.firstOrNull;
}