record method

Future<KoolbaseRecord> record(
  1. String collection,
  2. String id
)

The record id of collection, or KoolbaseNotFoundException.

Implementation

Future<KoolbaseRecord> record(String collection, String id) async {
  for (final r in _records(collection)) {
    if (r.id == id) return r;
  }
  throw const KoolbaseNotFoundException(
    'record not found',
    'record_not_found',
  );
}