function Connection::getServerVersion
Gets the server version.
Return value
string The PDO server version.
2 calls to Connection::getServerVersion()
- Connection::getMariaDbVersionMatch in core/
modules/ mysql/ src/ Driver/ Database/ mysql/ Connection.php - Gets the MariaDB portion of the server version.
- Connection::version in core/
modules/ mysql/ src/ Driver/ Database/ mysql/ Connection.php - Returns the version of the database server.
File
-
core/
modules/ mysql/ src/ Driver/ Database/ mysql/ Connection.php, line 275
Class
- Connection
- MySQL implementation of \Drupal\Core\Database\Connection.
Namespace
Drupal\mysql\Driver\Database\mysqlCode
protected function getServerVersion() : string {
if (!$this->serverVersion) {
$this->serverVersion = $this->query('SELECT VERSION()')
->fetchField();
}
return $this->serverVersion;
}