public function Sqlsqlsrv::listTables

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

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

Return value

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

Overrides SqlBase::listTables

File

lib/Drush/Sql/Sqlsqlsrv.php, line 41

Namespace

Drush\Sql

Class

Sqlsqlsrv

Code

public function listTables() {
  $return = $this->query('SELECT TABLE_NAME FROM information_schema.tables');
  $tables = drush_shell_exec_output();
  if (!empty($tables)) {
    // Shift off the header of the column of data returned.
    array_shift($tables);
    return $tables;
  }
}