function drush_sql_get_version

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

Wrapper for drush_get_class; instantiates a Drupal version-specific instance of SqlVersion class.

Return value

Drush\Sql\SqlVersion

3 calls to drush_sql_get_version()
drush_sql_conf in commands/sql/sql.drush.inc
Command callback. Displays the Drupal site's database connection string.
drush_sql_get_class in commands/sql/sql.drush.inc
Wrapper for drush_get_class; instantiates an driver-specific instance of SqlBase class.
drush_valid_db_credentials in includes/environment.inc
Tests the currently loaded database credentials to ensure a database connection can be made.

File

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

Code

function drush_sql_get_version() {
  return drush_get_class('Drush\Sql\Sql', array(), array(drush_drupal_major_version())) ? : NULL;
}