Get the list of database tables

@param string $dbType Database adapter type for Zend_Db
@param array|object $dbDescription Adapter-specific connection settings
@return array List of the tables
336444
public function getTables($dbType, $dbDescription)
    {
        $db = $this->_connect($dbType, $dbDescription);
        return $db->listTables();
    }
1086243
public function getFilterFieldDescriptors()
    {
        $fieldDescriptors = [];

        $fieldDescriptors['type_id'] = new DoctrineFieldDescriptor(
            'id',
            'type_id',
            self::$productTypeEntityName,
            null,
            [
                self::$productTypeEntityName => new DoctrineJoinDescriptor(
                    self::$productTypeEntityName,
                    static::$productEntityName . '.type'
                ),
            ]
        );

        $fieldDescriptors['status_id'] = new DoctrineFieldDescriptor(
            'id',
            'status_id',
            self::$productStatusEntityName,
            null,
            [
                self::$productStatusEntityName => new DoctrineJoinDescriptor(
                    self::$productStatusEntityName,
                    static::$productEntityName . '.status'
                ),
            ]
        );

        $fieldDescriptors['accounts_supplier_id'] = new DoctrineFieldDescriptor(
            'id',
            'supplier_id',
            self::$accountsSupplierEntityName,
            null,
            [
                self::$accountsSupplierEntityName => new DoctrineJoinDescriptor(
                    self::$accountsSupplierEntityName,
                    static::$productEntityName . '.supplier'
                ),
            ]
        );

        $fieldDescriptors['is_deprecated'] = new DoctrineFieldDescriptor(
            'isDeprecated',
            'is_deprecated',
            static::$productEntityName,
            null,
            []
        );

        $fieldDescriptors['parent'] = new DoctrineFieldDescriptor(
            'id',
            'parent',
            static::$productEntityName . 'Parent',
            'product.parent',
            [
                static::$productEntityName . 'Parent' => new DoctrineJoinDescriptor(
                    static::$productEntityName,
                    static::$productEntityName . '.parent'
                ),
            ],
            true
        );

        $fieldDescriptors['categories'] = new DoctrineFieldDescriptor(
            'id',
            'categories',
            static::$productEntityName . 'Categories',
            'products.categories',
            [
                static::$productEntityName . 'Categories' => new DoctrineJoinDescriptor(
                    static::$productEntityName,
                    static::$productEntityName . '.categories'
                ),
            ],
            true
        );

        $fieldDescriptors['attributes'] = new DoctrineFieldDescriptor(
            'id',
            'attributes',
            static::$productEntityName . 'ProductAttributes',
            'products.product-attributes',
            [
                static::$productEntityName . 'ProductAttributes' => new DoctrineJoinDescriptor(
                    static::$productEntityName,
                    static::$productEntityName . '.productAttributes'
                ),
            ],
            true
        );

        return $fieldDescriptors;
    }
373350
public function getPhpType($dbtype) {
        $phptype = 'string';
        if ($dbtype !== null) {
            foreach ($this->dbtypes as $type => $patterns) {
                foreach ($patterns as $pattern) {
                    if (preg_match($pattern, $dbtype)) {
                        $phptype = $type;
                        break 2;
                    }
                }
            }
        }
        return $phptype;
    }
946212
public function registerDoctrineTypeMapping($dbType, $doctrineType)
    {
        if ($this->doctrineTypeMapping === null) {
            $this->initializeAllDoctrineTypeMappings();
        }

        if (! Types\Type::hasType($doctrineType)) {
            throw DBALException::typeNotFound($doctrineType);
        }

        $dbType                             = strtolower($dbType);
        $this->doctrineTypeMapping[$dbType] = $doctrineType;

        $doctrineType = Type::getType($doctrineType);

        if (! $doctrineType->requiresSQLCommentHint($this)) {
            return;
        }

        $this->markDoctrineTypeCommented($doctrineType);
    }
854281
protected function getDoctrineSettings(array $databaseSettings)
    {
        $databaseMapping = [
            'ezmysqli' => 'pdo_mysql',
            'eZMySQLiDB' => 'pdo_mysql',
            'ezmysql' => 'pdo_mysql',
            'eZMySQLDB' => 'pdo_mysql',
            'ezpostgresql' => 'pdo_pgsql',
            'eZPostgreSQL' => 'pdo_pgsql',
            'postgresql' => 'pdo_pgsql',
            'pgsql' => 'pdo_pgsql',
            'oracle' => 'oci8',
            'ezoracle' => 'oci8',
        ];

        $databaseType = $databaseSettings['DatabaseImplementation'];
        if (isset($databaseMapping[$databaseType])) {
            $databaseType = $databaseMapping[$databaseType];
        }

        $databasePassword = $databaseSettings['Password'] != '' ? $databaseSettings['Password'] : null;
        $doctrineSettings = [
            'driver' => $databaseType,
            'host' => $databaseSettings['Server'],
            'user' => $databaseSettings['User'],
            'password' => $databasePassword,
            'dbname' => $databaseSettings['Database'],
            'charset' => 'UTF8',
        ];
        if (isset($databaseSettings['Port']) && !empty($databaseSettings['Port'])) {
            $doctrineSettings['port'] = $databaseSettings['Port'];
        }
        if (isset($databaseSettings['Socket']) && $databaseSettings['Socket'] !== 'disabled') {
            $doctrineSettings['unix_socket'] = $databaseSettings['Socket'];
        }

        return $doctrineSettings;
    }
176641
public function getDatabaseMetadata(
        Connection $connection,
        string $databaseName
    ): DatabaseMetadata {
        // Get a list of table names
        $tableNameStatement = $connection
            ->createQueryBuilder()
            ->select([
                'tables.TABLE_NAME AS name'
            ])
            ->from('information_schema.TABLES', 'tables')
            ->where('TABLE_SCHEMA = :schema')
            ->andWhere('TABLE_TYPE = "BASE TABLE"')
            ->setParameter('schema', $databaseName)
            ->execute();

        // Build table metadata
        $tableMetadataList = [];
        while ($tableName = $tableNameStatement->fetchColumn(0)) {
            $tableMetadataList[] = $this->getTableMetadata($connection, $databaseName, $tableName);
        }

        return new DatabaseMetadata($databaseName, $tableMetadataList);
    }
1281707
public function listDatabases()
    {
        $sql = $this->_platform->getListDatabasesSQL();

        $databases = $this->_conn->fetchAll($sql);

        return $this->_getPortableDatabasesList($databases);
    }
453849
protected function extractType($dbType)
	{
		if(strpos($dbType,'[')!==false || strpos($dbType,'char')!==false || strpos($dbType,'text')!==false)
			$this->type='string';
		elseif(strpos($dbType,'bool')!==false)
			$this->type='boolean';
		elseif(preg_match('/(real|float|double)/',$dbType))
			$this->type='double';
		elseif(preg_match('/(integer|oid|serial|smallint)/',$dbType))
			$this->type='integer';
		else
			$this->type='string';
	}
34325
public function getTables($which_connection='')
    {
        if ($which_connection == '') {
            $which_connection=$this->default_db;
        }
        $conn = $this->connections[$which_connection];

        return $conn->MetaTables();
    }
172995
public function getTable($table_name)
    {
        if (!$this->tables->has('tables', $table_name))
        {
            if ($this->db !== null)
            {
                $table = $this->db->loadTable($table_name);
                $this->tables->set('tables', $table_name, $table);
            }
            else
                throw new DBException("Table $table not ofund");
        }

        return $this->tables->get('tables', $table_name);
    }
869223
public List<String> getTables(String dataType) throws SQLException {
		List<Contents> contents = getContents(dataType);
		List<String> tableNames = new ArrayList<String>();
		for (Contents content : contents) {
			tableNames.add(content.getTableName());
		}
		return tableNames;
	}
463451
protected function _list_tables($prefix_limit = FALSE)
	{
		$sql = 'SELECT "NAME" FROM "SQLITE_MASTER" WHERE "TYPE" = \'table\'';

		if ($prefix_limit === TRUE && $this->dbprefix !== '')
		{
			return $sql.' AND "NAME" LIKE \''.$this->escape_like_str($this->dbprefix)."%' "
				.sprintf($this->_like_escape_str, $this->_like_escape_chr);
		}

		return $sql;
	}
1072764
public function list_databases()
	{
		if (isset($this->db->data_cache['db_names']))
		{
			return $this->db->data_cache['db_names'];
		}

		return $this->db->data_cache['db_names'] = cubrid_list_dbs($this->db->conn_id);
	}
373145
public function getTables(): array
	{
		$sql = $this->sql->tableList();
		$res = $this->query($sql);
		return dbFilter($res->fetchAll(PDO::FETCH_ASSOC), 'name');
	}
1312881
protected function getDoctrineColumnAliases(ColumnDefinition $columnMetadata)
    {
        if (in_array($columnMetadata['type'], array_keys($this->aliases))) {
            $index = $columnMetadata['type'];

            // fix for nullable datetime
            if ($columnMetadata['type'] == 'dateTime' && ! empty($columnMetadata['nullable'])) {
                $this->aliases['dateTime']['options'] = array_except($this->aliases['dateTime']['options'], 'default');
            }

            // update primary key
            if (! empty($this->aliases[$index]['primary'])) {
                $columnMetadata['primary'] = $this->aliases[$index]['primary'];
            }

            // update unsigned
            if (! empty($this->aliases[$index]['options']['unsigned'])) {
                $columnMetadata['unsigned'] = $this->aliases[$index]['options']['unsigned'];
            }

            // update options
            if (! empty($this->aliases[$index]['options'])) {
                $columnMetadata['options'] = array_merge($columnMetadata['options'], $this->aliases[$index]['options']);
            }

            // update type
            $columnMetadata['type'] = $this->aliases[$index]['type'];
        }

        return $columnMetadata;
    }
807986
protected function getDatabaseSchemata(string $dbName): array
    {
        $sql = 'SELECT
            default_character_set_name,
            default_collation_name
            FROM information_schema.SCHEMATA
            WHERE schema_name = %s;';
        $sql = sprintf($sql, $this->quote($dbName));
        $row = $this->createQueryStatement($sql)->fetch();

        return $row;
    }
841131
public function getTables()
    {
        $options = $this->getOptions();
        $tables = [];

        foreach ($this->fetchAll(sprintf("select name from sqlite_master where type = 'table'")) as $row) {
            if ($row[0] == 'sqlite_sequence') continue;

            $table = new Table($row[0], [], $this);
            $tables[] = $table;
            $options = [];

            $describes = $this->fetchAll(sprintf('PRAGMA table_info(%s)', $this->quoteTableName($table->getName())));
            $primary_keys = [];
            foreach ($describes as $describe) {
                if ($describe['pk'] === '1') {
                    $primary_keys[] = $describe['name'];
                }
            }

            if (! $primary_keys || (count($primary_keys) === 1 && $primary_keys[0] === 'id')) {
            }

            // $this->table('foo', ['id' => 'foo_id']);
            elseif (count($primary_keys) === 1 && $primary_keys[0] !== 'id') {
                $options = ['id' => $primary_keys[0]];
            } else {
                $options = ['id' => false, 'primary_key' => $primary_keys];
            }

            $table->setOptions($options);
        }

        return $tables;
    }