function _drush_sql_get_all_db_specs

6.x sql.drush.inc _drush_sql_get_all_db_specs()
4.x sql.drush.inc _drush_sql_get_all_db_specs()
5.x sql.drush.inc _drush_sql_get_all_db_specs()
1 call to _drush_sql_get_all_db_specs()
drush_sql_conf in commands/sql/sql.drush.inc
Command callback. Displays the Drupal site's database connection string.

File

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

Code

function _drush_sql_get_all_db_specs() {
  switch (drush_drupal_major_version()) {
    case 6:
      if (!isset($GLOBALS['db_url'])) {
        return NULL;
      }
      return drush_sitealias_convert_db_from_db_url($GLOBALS['db_url']);

    default:
      if (!isset($GLOBALS['databases'])) {
        return NULL;
      }
      return $GLOBALS['databases'];
  }
}