Final Class Yiisoft\Db\Pgsql\Command
| Inheritance | Yiisoft\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
| Method | Description | Defined By |
|---|---|---|
| showDatabases() | Yiisoft\Db\Pgsql\Command |
Method Details
| 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();
}
Signup or Login in order to comment.