public function Sqlpgsql::listTables

8.0.x Sqlpgsql.php public Sqlpgsql::listTables()
7.x Sqlpgsql.php public Sqlpgsql::listTables()
master Sqlpgsql.php public Sqlpgsql::listTables()

Extract the name of all existing tables in the given database.

Return value

array|null An array of table names which exist in the current database.

Overrides SqlBase::listTables

File

lib/Drush/Sql/Sqlpgsql.php, line 98

Namespace

Drush\Sql

Class

Sqlpgsql

Code

public function listTables() {
  $return = $this->query(PSQL_SHOW_TABLES);
  $tables = drush_shell_exec_output();
  if (!empty($tables)) {
    return $tables;
  }
  return array();
}