Final Class Yiisoft\Db\Pgsql\Command
| Inheritance | Yiisoft\ |
|---|
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\ |
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();
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.