Loads the names of the m:n tables.
@return MakeMWBModel
491583
protected function loadMNTables()
    {
        if ($tables = $this->option('pivots')) {
            $this->pivotTables = array_map('trim', array_filter(explode(',', rtrim($tables, ','))));
        } // if

        return $this;
    }
529744
protected function getColumnNames()
    {
        $names = array();
        $columns = $this->db->getSchemaManager()->listTableColumns($this->table);

        if (count($columns) == 0) {
            $schema = $this->schema ?: $this->app['db.schema'];
            $fullTable = $schema.".".$this->table;
            $columns = $this->db->getSchemaManager()->listTableColumns($fullTable);
        }

        foreach ($columns as $column) {
            $names[] = $column->getName();
        }

        return $names;
    }
890847
protected function _table()
    {
        return $this->_controller()
            ->loadModel(
                null,
                $this->getConfig('modelFactory') ?: $this->_controller()->getModelType()
            );
    }
461802
private function getAllTableNames()
    {
        $handler = $this->databaseConnection->queryAndHandle("SHOW TABLES FROM `" . $this->databaseConnection->getDatabaseName() . "`");
        $tableNames = array();

        if ($handler->getResultSize() > 0) {
            while ($oDatabaseResultRow = $handler->fetchNextResultObject()) {
                $tablesInVariableName = "Tables_in_" . $this->databaseConnection->getDatabaseName();
                // add only tables with the current connection prefix
                if (
                    substr(
                        $oDatabaseResultRow->$tablesInVariableName,
                        0,
                        strlen($this->databaseConnection->getTablePrefix()))
                    == $this->databaseConnection->getTablePrefix()) {

                    array_push($tableNames, $oDatabaseResultRow->$tablesInVariableName);
                }

            }
        }

        return $tableNames;
    }
130351
public function GetTableNames($ommitEmptyTables = false)
	{
		return $this->_driver->GetTableName($this->_dbconn,$this->GetDBName(),$ommitEmptyTables);
	}
1128208
public function getTables()
    {
        $tables = [];
        if ($this->serverSupportFeature(3)) {
            $result = $this->runMongoCommand(['listCollections' => 1]);
            foreach ($result as $val) {
                $tables[] = $val['name'];
            }
        } else {
            $result = $this->runMongoQuery('system.namespaces');
            foreach ($result as $val) {
                if (strpos($val['name'], '$') === false) {
                    $tables[] = substr($val['name'], strpos($val['name'], '.') + 1);
                }
            }
        }

        return $tables;
    }
278904
protected function getTableNames(): array
    {
        $dbName = $this->config[DbItf::DB_CFG_DATABASE];
        $resp = $this->dbRunQuery(sprintf('SHOW FULL TABLES FROM `%s`', $dbName));

        $tableAndViewNames = [];
        while ($row = $resp->fetch_assoc()) {
            $tableAndViewNames[] = array_change_key_case($row);
        }

        return $tableAndViewNames;
    }
782053
public function tables()
	{
		$tables = array();
		$sth = $this->queryForTables();

		while (($row = $sth->fetch(PDO::FETCH_NUM)))
			$tables[] = $row[0];

		return $tables;
	}
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;
    }
593474
public function getTableAndMetaModelsList()
    {
        $sqlTable     = $this->translator->trans(
            'tl_metamodel_attribute.select_table_type.sql-table',
            [],
            'contao_tl_metamodel_attribute'
        );
        $translated   = $this->translator->trans(
            'tl_metamodel_attribute.select_table_type.translated',
            [],
            'contao_tl_metamodel_attribute'
        );
        $untranslated = $this->translator->trans(
            'tl_metamodel_attribute.select_table_type.untranslated',
            [],
            'contao_tl_metamodel_attribute'
        );

        $result = $this->getMetaModelTableNames($translated, $untranslated);

        foreach ($this->connection->getSchemaManager()->listTableNames() as $table) {
            if (0 !== strpos($table, 'mm_')) {
                $result[$sqlTable][$table] = $table;
            }
        }

        if (\is_array($result[$translated])) {
            \asort($result[$translated]);
        }

        if (\is_array($result[$untranslated])) {
            \asort($result[$untranslated]);
        }

        if (\is_array($result[$sqlTable])) {
            \asort($result[$sqlTable]);
        }

        return $result;
    }
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));
        }
    }
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);
    }
121147
public function getTables()
    {
        $app = Base::instance();
        $key = 'CACHE.db_tables';
        if ($app->devoid($key)) {
            $result = $this->getConnection()->pdo()
                ->query('SHOW TABLES')->fetchAll(PDO::FETCH_ASSOC);
            $tables = [];
            foreach ($result as $table) {
                $tables[] = array_pop($table);
            }

            $app->set($key, $tables, 60);
        }

        return $app->get($key);
    }
614476
public function getTables()
    {
        $cmd = array(
            'mysql' => array(
                "show tables"),
            'sqlite2?' => array(
                "SELECT name FROM sqlite_master WHERE type='table' AND name!='sqlite_sequence'"),
            'pgsql|sybase|dblib' => array(
                "select table_name from information_schema.tables where table_schema = 'public'"),
            'mssql|sqlsrv|odbc' => array(
                "select table_name from information_schema.tables"),
            'ibm' => array("select TABLE_NAME from sysibm.tables"),
        );
        $query = $this->findQuery($cmd);
        if (!$query[0]) return false;
        $tables = $this->db->exec($query[0]);
        if ($tables && is_array($tables) && count($tables) > 0)
            foreach ($tables as &$table)
                $table = array_shift($table);
        return $tables;
    }
738754
private function getDbTables()
    {
        $oDB = \OxidEsales\Eshop\Core\DatabaseProvider::getMaster(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_NUM);
        $aTables = $oDB->getCol("SHOW TABLES");

        foreach ($aTables as $iKey => $sTable) {
            if (strpos($sTable, 'oxv_') === 0) {
                unset($aTables[$iKey]);
            }
        }

        return $aTables;
    }
1342677
public function getTables()
    {
        // Get main table
        $tables = [$this->queryBuilder->from];

        // Add possible join tables
        $joins = $this->queryBuilder->joins ? : [];
        foreach ($joins as $join) {

            if (!in_array($join->table, $tables) && is_string($join->table)) {
                $tables[] = $join->table;
            }
        }

        return $tables;
    }
405393
public function tables() {
		$table = new \cli\Table();
		$rows  = Model::$list;
		if ( ! $rows ) {
			\WP_CLI::error( 'No model is regsitered.' );
		}
		$table->setHeaders( [ 'Table Name', 'Model Class' ] );
		foreach ( $rows as $table_name => $class) {
			$table->addRow( [ $table_name, $class ] );
		}
		$table->display();
	}