0 follower

Final Class Yiisoft\Db\Pgsql\Command

InheritanceYiisoft\Db\Pgsql\Command » Yiisoft\Db\Driver\Pdo\AbstractPdoCommand

Implements a database command that can be executed with a PDO (PHP Data Object) database connection for PostgreSQL Server.

Public Methods

Hide inherited methods

Method Description Defined By
showDatabases() Yiisoft\Db\Pgsql\Command

Method Details

Hide inherited methods

showDatabases() public method

public array showDatabases ( )

                public function showDatabases(): array
{
    $sql = <<<SQL
    SELECT datname FROM pg_database WHERE datistemplate = false AND datname NOT IN ('postgres', 'template0', 'template1')
    SQL;
    return $this->setSql($sql)->queryColumn();
}