getTables method
override
Inspects the current database schema.
Implementation
@override
Future<List<TableMetadata>> getTables() async {
final result = await _connection.execute(
"SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'",
);
final tables = <TableMetadata>[];
for (final row in result.rows) {
final tableName = row['name'] as String;
final columns = await _getColumns(tableName);
tables.add(TableMetadata(tableName, columns));
}
return tables;
}