read method

Future<R?> read(
  1. Session session,
  2. Object key, {
  3. List<Object>? columns(
    1. C columns
    )?,
})

Implementation

Future<R?> read(
  Session session,
  /* K | List  */ Object key, {
  List<Object>? Function(C columns)? columns,
}) async {
  final list = await query(
    session,
    columns: columns,
    limit: 2,
    where: (c) => _whereFromKey(c, key),
  );
  return list.isEmpty ? null : list.single;
}