Returns list of tables in a database

@return array List of all tables of the current database
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;
    }
1075169
public function showTables()
    {
        $sql = 'SHOW TABLES';
        $query = $this->pdo->prepare($sql);
        $query->execute();

        return $query->fetchAll(PDO::FETCH_ASSOC);
    }
254172
final public function showTables()
	{
		$q = $this->query('SHOW TABLES');
		$q->execute();
		return $q->fetchAll(self::FETCH_COLUMN);
	}
310315
public function fetchAllTables()
    {
        $tables = array();
        $result = $this->pdo->query('SHOW TABLES')->fetchAll();

        foreach ($result as $index => $array) {
            // Extract a value - we don't care about a key
            $data = array_values($array);
            // Its ready not, just append it
            $tables[] = $data[0];
        }

        return $tables;
    }
477890
public function getTableList()
    {
        // Set the query to get the tables statement.
        $this->setQuery($this->platform->getListTablesSQL());
        $tables = $this->loadColumn();

        return $tables;
    }
441709
public function listDatabases()
    {
        $json = (string) $this->client->request('GET', '/_all_dbs')->getBody();
        $databases = JSONEncoder::decode($json);

        return $databases;
    }
1136117
public function getTableList()
	{
		// Set the query to get the tables statement
		$query = $this->getQuery()
			->select('table_name')
			->from('information_schema.tables')
			->whereEquals('table_type', 'BASE TABLE')
			->whereNotIn('table_schema', ['pg_catalog', 'information_schema'])
			->order('table_name', 'asc')
			->toString();

		$this->setQuery($query);
		$tables = $this->loadColumn();

		return $tables;
	}
527924
public function getTables()
    {
        if (is_null($this->_aTables)) {
            $aTables = $this->formDatabaseTablesArray();
            $this->setTables($aTables);
        }

        return $this->_aTables;
    }
315300
public function getTableColumns() : array
    {
        if (!$this->isTableNameSet()) {
            return [];
        }
        
        $sql = "SHOW COLUMNS FROM `".$this->tableName."`";
        $stmt = $this->db->query($sql);
        $arrResult = $stmt->fetchAll(PDO::FETCH_ASSOC);
        return $arrResult;
    }
943843
public static function tables()
    {
        $tables = false;
        //
        $Tables = Driver::read('SHOW TABLES', Driver::INDEX);
        // die(var_dump($Tables));
        //
        foreach ($Tables as $row) {
            $target_tables[] = $row[0];
        }
        //
        if ($tables !== false) {
            $target_tables = array_intersect($target_tables, $tables);
        }
        //
        return $target_tables;
    }
492107
public function getAll()
    {
        $db = new DB();
        $result = $db->db()->select(['db_name'=>__config()->auth->db_name, 'table'=>__config()->auth->db_table]);
        $db->db()->close();

        return $result;
    }
637914
public function tableNames()
    {
        $names          = [];
        $query          = $this->getQueryBuilder();
        $names[]        = $query->from;
        $joins          = $query->joins ?: [];
        $databasePrefix = $this->prefix;
        foreach ($joins as $join) {
            $table   = preg_split('/ as /i', $join->table);
            $names[] = $table[0];
            if (isset($table[1]) && !empty($databasePrefix) && strpos($table[1], $databasePrefix) == 0) {
                $names[] = preg_replace('/^' . $databasePrefix . '/', '', $table[1]);
            }
        }

        return $names;
    }
1098164
public function getTables()
    {
        $statement = $this->connection->prepare("SELECT * FROM information_schema.tables WHERE table_catalog = :database AND table_schema = 'public'");
        $statement->execute([
            ':database' => $this->Databaser->database
        ]);

        return $statement->fetchAll(\PDO::FETCH_ASSOC);
    }
137059
public function tables()
    {
        $db = ConnectionManager::get('default');
        $db->connect();
        $schemaCollection = $db->schemaCollection();
        $tables = $schemaCollection->listTables();
        foreach ($tables as $table) {
            $this->out(sprintf('- %s', $table));
        }
    }
1253654
public function getAllTableStatus()
    {
        $this->currentQueryIsMaster = false;
        $stmt = $this->prepare('SHOW TABLE STATUS FROM ' . $this->conf['master']['dbname'], $this->rlink);
        $this->execute($stmt);
        $res = $stmt->fetchAll(\PDO::FETCH_ASSOC);
        $return = [];
        foreach ($res as $val) {
            $return[$val['Name']] = $val;
        }
        return $return;
    }
293854
public function getTables($dbName = '')
    {
        $sql    = !empty($dbName) ? 'SHOW TABLES FROM ' . $dbName : 'SHOW TABLES ';
        $pdo    = $this->query($sql, [], false, true);
        $result = $pdo->fetchAll(PDO::FETCH_ASSOC);
        $info   = [];

        foreach ($result as $key => $val) {
            $info[$key] = current($val);
        }

        return $info;
    }
972801
final public function fetchTableNames() {
        if ($this->tableNames !== null) {
            return array_values($this->tableNames);
        }

        $names = $this->fetchTableNamesDb();

        $this->tableNames = [];
        foreach ($names as $name) {
            $name = $this->stripPrefix($name);
            $this->tableNames[strtolower($name)] = $name;
        }

        return array_values($this->tableNames);
    }