public function Sqlmysql::db_exists

8.0.x Sqlmysql.php public Sqlmysql::db_exists()
7.x Sqlmysql.php public Sqlmysql::db_exists()
master Sqlmysql.php public Sqlmysql::db_exists()

Overrides SqlBase::db_exists

File

lib/Drush/Sql/Sqlmysql.php, line 72

Namespace

Drush\Sql

Class

Sqlmysql

Code

public function db_exists() {
  $current = drush_get_context('DRUSH_SIMULATE');
  drush_set_context('DRUSH_SIMULATE', FALSE);
  // Suppress output. We only care about return value.
  $return = $this->query("SELECT 1;", NULL, drush_bit_bucket());
  drush_set_context('DRUSH_SIMULATE', $current);
  return $return;
}