method getDatabases documentation in bbn\Db\Languages\Pgsql

Return databases' names as an array.

Example

X::dump($db->getDatabases()); /* (array)[ "db_customers", "db_clients", "db_empty", "db_example", "db_mail" ] function() { if (!$this->check()) { return null; } $x = []; if ($r = $this->rawQuery("SELECT datname FROM pg_database WHERE datistemplate = false AND datname != 'postgres'")) { $x = array_map( function ($a) { return $a['datname']; }, $this->fetchAllResults($r, \PDO::FETCH_ASSOC) ); sort($x); } return $x; }

Return databases' names as an array. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.