src/PDO/SchemaPDOMssql.php
/**
     * Returns all table names in the database.
     *
     * This method should be overridden by child classes in order to support this feature because the default
     * implementation simply throws an exception.
     *
     * @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema.
     *
     * @throws Exception|InvalidConfigException|Throwable
     *
     * @return array all table names in the database. The names have NO schema name prefix.
     */
Returns all table names in the database.
This method should be overridden by child classes in order to support this feature because the default
implementation simply throws an exception.

@param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema.



@return array all table names in the database. The names have NO schema name prefix.
Returns all table names in the database . This method should be overridden by child classes in order to support this feature because the default implementation simply throws an exception . @param string $schema the schema of the tables . Defaults to empty string meaning the current or default schema . @return array all table names in the database . The names have NO schema name prefix .
protected function findTableNames(string $schema = ''): array
    {
        if ($schema === '') {
            $schema = $this->defaultSchema;
        }
        $sql = <<<SQL
SELECT [t].[table_name]
FROM [INFORMATION_SCHEMA].[TABLES] AS [t]
WHERE [t].[table_schema] = :schema AND [t].[table_type] IN ('BASE TABLE', 'VIEW')
ORDER BY [t].[table_name]
SQL;
        $tables = $this->db->createCommand($sql, [':schema' => $schema])->queryColumn();
        return array_map(static function ($item) {
            return '[' . $item . ']';
        }, $tables);
    }
protected function findTableNames ( string $ schema = '' ) : array { if ( $ schema === '' ) { $ schema = $ this -> defaultSchema ; } $ sql = <<< SQL SELECT [t].[table_name] FROM [INFORMATION_SCHEMA].[TABLES] AS [t] WHERE [t].[table_schema] = :schema AND [t].[table_type] IN ('BASE TABLE', 'VIEW') ORDER BY [t].[table_name] 
SQL ; $ tables = $ this -> db -> createCommand ( $ sql , [ ':schema' => $ schema ] ) -> queryColumn ( ) ; return array_map ( static function ( $ item ) { return '[' . $ item . ']' ; } , $ tables ) ; }
Returns all table names in the database.
Returns all table names in the database .