countTablesIn method

  1. @override
Statement countTablesIn(
  1. List<String> tableNames
)
override

Counts tables whose name is included in tableNames.

Implementation

@override
Statement countTablesIn(List<String> tableNames) {
  final sql = '''
    SELECT count(name) as "count" FROM sqlite_master
      WHERE type='table'
      AND name IN (${tableNames.map((_) => '?').join(', ')})
  ''';
  return Statement(
    sql,
    tableNames,
  );
}