queryCount method

Future<int> queryCount(
  1. String tableName
)

查询该表的数据数

Implementation

Future<int> queryCount(String tableName) async {
  List<Map<String, Object?>> data = await _database!.rawQuery('SELECT count(*) FROM $tableName');
  return data[0]['count(*)'] as int;
}