Returns a list of tables/views in the specified database.

        If no database is specified, the current database is used.
        This includes all temporary views.
169028
def listTables(self, dbName=None):
        
        if dbName is None:
            dbName = self.currentDatabase()
        iter = self._jcatalog.listTables(dbName).toLocalIterator()
        tables = []
        while iter.hasNext():
            jtable = iter.next()
            tables.append(Table(
                name=jtable.name(),
                database=jtable.database(),
                description=jtable.description(),
                tableType=jtable.tableType(),
                isTemporary=jtable.isTemporary()))
        return tables
307450
def tables(self):
        """"""
        tables = []
        self.cursor.execute("SELECT name FROM sqlite_master WHERE type='table'")
        for table_info in self.cursor.fetchall():
            if table_info[0] != 'sqlite_sequence':
                tables.append(table_info[0])
        return tables
1139412
def _GetTableNames(self, database):
    
    table_names = []
    for esedb_table in database.tables:
      table_names.append(esedb_table.name)

    return table_names
345871
public function list_tables()
    {
        // get tables if not cached
        if ($this->tables === null) {
            // first fetch current database name
            $d = $this->query("SELECT database()");
            $d = $this->fetch_array($d);

            // get list of tables in current database
            $q = $this->query("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES"
                . " WHERE TABLE_SCHEMA = ? AND TABLE_TYPE = 'BASE TABLE'"
                . " ORDER BY TABLE_NAME", $d ? $d[0] : '');

            $this->tables = $q ? $q->fetchAll(PDO::FETCH_COLUMN, 0) : array();
        }

        return $this->tables;
    }
245073
def get_table_names(self, connection, schema=None, **kw):
        
        return self._get_table_or_view_names('r', connection, schema, **kw)
977770
def tables(self):
        
        select = ("SELECT name FROM sqlite_master",)
        query = self.execute(*select)
        result = query.fetchall()

        # Filter first column from rows.
        return [row[0] for row in result]
33039
private static function _get_databases(): ?databases
  {
    if ( self::check() ){
      if ( !self::$databases_obj && ($db = self::_get_db()) ){
        self::$databases_obj = new databases($db);
      }
      return self::$databases_obj;
    }
    return null;
  }
193056
def tables(self):
        
        from ambry.orm import Table
        from sqlalchemy.orm import lazyload

        return (self.dataset.session.query(Table)
                .filter(Table.d_vid == self.dataset.vid)
                .options(lazyload('*'))
                .all())
90711
def tables(self):
        
        if self._check_db() == False:
            return
        try:
            pmodels = self._tables()
            if pmodels is None:
                return
            num = len(pmodels)
            s = "s"
            if num == 1:
                s = ""
            msg = "Found " + colors.bold(str(num)) + " table" + s + ":\n"
            msg += "\n".join(pmodels)
            self.info(msg)
        except Exception as e:
            self.err(e, "Can not print tables")
224548
def tables(self):
        """"""
        self.own_connection.row_factory = sqlite3.Row
        self.own_cursor.execute('SELECT name from sqlite_master where type="table";')
        result = [x[0].encode('ascii') for x in self.own_cursor.fetchall()]
        self.own_connection.row_factory = self.factory
        return result
1057256
def tables(self):
        """"""
        if len(self._tables) == 0:
            self.refresh_schema(self._exclude_system_tables, self._use_cache)
        return self._tables
84885
def info(self):
        
        t = self.query("SELECT * FROM sqlite_master WHERE type='table'", fmt='table')
        all_tables = t['name'].tolist()
        print('\nDatabase path: {} \nSQL path: {}\n'.format(self.dbpath, self.sqlpath))
        print('Database Inventory')
        print('==================')
        for table in ['sources'] + [t for t in all_tables if
                                    t not in ['sources', 'sqlite_sequence']]:
            x = self.query('select count() from {}'.format(table), fmt='array', fetch='one')
            if x is None: continue
            print('{}: {}'.format(table.upper(), x[0]))
1333349
def list_tables(self, dataset):
        

        request = self.client.tables().list(projectId=dataset.project_id,
                                            datasetId=dataset.dataset_id,
                                            maxResults=1000)
        response = request.execute()

        while response is not None:
            for t in response.get('tables', []):
                yield t['tableReference']['tableId']

            request = self.client.tables().list_next(request, response)
            if request is None:
                break

            response = request.execute()
594778
def tables(self):
        
        if self.schema:
            return self.tables_in_schema(self.schema)
        else:
            tables = []
            for schema in self.schemas:
                tables = tables + [
                    schema + "." + t for t in self.tables_in_schema(schema)
                ]
            return tables
988179
public void listAllTables() {
    System.out.println("\nListing tables in current instance");
    // [START bigtable_list_tables]
    // Lists tables in the current instance.
    try {
      List<String> tableIds = adminClient.listTables();
      for (String tableId : tableIds) {
        System.out.println(tableId);
      }
    } catch (NotFoundException e) {
      System.err.println("Failed to list tables from a non-existent instance: " + e.getMessage());
    }
    // [END bigtable_list_tables]
  }
790284
def inspect_tables(conn, database_metadata):
    "  "
    tables = {}
    table_names = [
        r["name"]
        for r in conn.execute(
            'select * from sqlite_master where type="table"'
        )
    ]

    for table in table_names:
        table_metadata = database_metadata.get("tables", {}).get(
            table, {}
        )

        try:
            count = conn.execute(
                "select count(*) from {}".format(escape_sqlite(table))
            ).fetchone()[0]
        except sqlite3.OperationalError:
            # This can happen when running against a FTS virtual table
            # e.g. "select count(*) from some_fts;"
            count = 0

        column_names = table_columns(conn, table)

        tables[table] = {
            "name": table,
            "columns": column_names,
            "primary_keys": detect_primary_keys(conn, table),
            "count": count,
            "hidden": table_metadata.get("hidden") or False,
            "fts_table": detect_fts(conn, table),
        }

    foreign_keys = get_all_foreign_keys(conn)
    for table, info in foreign_keys.items():
        tables[table]["foreign_keys"] = info

    # Mark tables 'hidden' if they relate to FTS virtual tables
    hidden_tables = [
        r["name"]
        for r in conn.execute(
            """
                select name from sqlite_master
                where rootpage = 0
                and sql like '%VIRTUAL TABLE%USING FTS%'
            """
        )
    ]

    if detect_spatialite(conn):
        # Also hide Spatialite internal tables
        hidden_tables += [
            "ElementaryGeometries",
            "SpatialIndex",
            "geometry_columns",
            "spatial_ref_sys",
            "spatialite_history",
            "sql_statements_log",
            "sqlite_sequence",
            "views_geometry_columns",
            "virts_geometry_columns",
        ] + [
            r["name"]
            for r in conn.execute(
                """
                    select name from sqlite_master
                    where name like "idx_%"
                    and type = "table"
                """
            )
        ]

    for t in tables.keys():
        for hidden_table in hidden_tables:
            if t == hidden_table or t.startswith(hidden_table):
                tables[t]["hidden"] = True
                continue

    return tables
973859
def get_tables(self, table_name="", **kwargs):
        
        with self.connection(**kwargs) as connection:
            kwargs['connection'] = connection
            return self._get_tables(str(table_name), **kwargs)