getById method

  1. @override
Future<T?> getById(
  1. Id id
)
override

Implementation

@override
Future<T?> getById(Id id) async {
  final res = await _table()
      .select()
      .eq(config.idColumn, config.idToString(id))
      .maybeSingle();
  if (res == null) return null;
  return config.fromJson(Map<String, dynamic>.from(res));
}