listTablesNamesImpl method

  1. @override
List<String> listTablesNamesImpl(
  1. DBSQLiteConnectionWrapper connection
)
override

Lists the names of the database tables, with connection.

Implemented by the adapters that introspect their schema (see findRelationshipTables). Default: throws UnsupportedError (an adapter that doesn't introspect a database, e.g. DBSQLMemoryAdapter, never calls it).

Implementation

@override
List<String> listTablesNamesImpl(DBSQLiteConnectionWrapper connection) {
  var results = connection.select(
    "SELECT name FROM sqlite_master "
    "WHERE type = 'table' AND name NOT LIKE 'sqlite_%'",
  );

  return results.map((r) => r['name'].toString()).toList();
}