findById method

Future<TRow?> findById(
  1. TKey key, {
  2. List<MssqlRelation<TRow, Object?>> include = const [],
})

The row with this key, or null.

Implementation

Future<TRow?> findById(
  TKey key, {
  List<MssqlRelation<TRow, Object?>> include = const [],
}) async {
  _requireKey('findById');
  final rows = await _run(_base.where(_keyCondition(key)), include: include);
  return rows.isEmpty ? null : rows.first;
}