selectCount static method

Future<int?> selectCount(
  1. DatabaseExecutor db,
  2. String tableName, {
  3. String? where,
  4. List<Object?>? whereArgs,
})

Select count

Implementation

static Future<int?> selectCount(DatabaseExecutor db, String tableName,
    {String? where, List<Object?>? whereArgs}) async {
  Object? value = await select(db, tableName, ["count(1)"], where: where, whereArgs: whereArgs, isUnique: true);
  return value is int ? value : null;
}