function drush_sql_conf

8.0.x sql.drush.inc drush_sql_conf()
6.x sql.drush.inc drush_sql_conf()
7.x sql.drush.inc drush_sql_conf()
3.x sql.drush.inc drush_sql_conf()
4.x sql.drush.inc drush_sql_conf()
5.x sql.drush.inc drush_sql_conf()
master sql.drush.inc drush_sql_conf()

Command callback. Displays the Drupal site's database connection string.

File

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

Code

function drush_sql_conf() {
  drush_sql_bootstrap_database_configuration();
  if (drush_get_option('all')) {
    $sqlVersion = drush_sql_get_version();
    return $sqlVersion->getAll();
  }
  else {
    $sql = drush_sql_get_class();
    return $sql->db_spec();
  }
}