function Connection::clientVersion

Same name in other branches
  1. 9 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::clientVersion()
  2. 10 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::clientVersion()
  3. 11.x core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::clientVersion()

Returns the version of the database client.

File

core/lib/Drupal/Core/Database/Connection.php, line 1405

Class

Connection
Base Database API class.

Namespace

Drupal\Core\Database

Code

public function clientVersion() {
    return $this->connection
        ->getAttribute(\PDO::ATTR_CLIENT_VERSION);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.