function drush_sql_bootstrap_database_configuration

8.0.x sql.drush.inc drush_sql_bootstrap_database_configuration()
7.x sql.drush.inc drush_sql_bootstrap_database_configuration()
master sql.drush.inc drush_sql_bootstrap_database_configuration()

Safely bootstrap Drupal to the point where we can access the database configuration.

3 calls to drush_sql_bootstrap_database_configuration()
drush_sql_bootstrap_further in commands/sql/sql.drush.inc
Check whether further bootstrap is needed. If so, do it.
drush_sql_conf in commands/sql/sql.drush.inc
Command callback. Displays the Drupal site's database connection string.
Sql7::get_db_spec in lib/Drush/Sql/Sql7.php

File

commands/sql/sql.drush.inc, line 193
Drush sql commands

Code

function drush_sql_bootstrap_database_configuration() {
  // Under Drupal 7, if the database is configured but empty, then
  // DRUSH_BOOTSTRAP_DRUPAL_CONFIGURATION will throw an exception.
  // If this happens, we'll just catch it and continue.
  // TODO:  Fix this in the bootstrap, per http://drupal.org/node/1996004
  try {
    drush_bootstrap_max(DRUSH_BOOTSTRAP_DRUPAL_CONFIGURATION);
  }
  catch (Exception $e) {
  }
}