queryAll method

  1. @override
Future<List<T>> queryAll([
  1. String? tableName
])
override

查询该表的所有数据

Implementation

@override
Future<List<T>> queryAll([String? tableName]) async {
  List<Map<String, Object?>> lists = await db.query(tableName ?? table);
  if (lists.isEmpty) return [];
  List<T> datas = [];
  for (Map<String, Object?> map in lists) {
    datas.add(fromJson(map));
  }
  return datas;
}