queryOne method

  1. @override
Future<AvatarModel?> queryOne(
  1. Object arg, [
  2. String? tableName
])
inherited

根据id,查询一个

Implementation

@override
Future<T?> queryOne(Object arg, [String? tableName]) async {
  List<T>? _items = await query(tableName: tableName, where: "$_primaryKey = ?", whereArgs: [arg]);
  return _items?.first;
}