protected function Connection::getServerVersion in Drupal 9
Same name in this branch
- 9 core/lib/Drupal/Core/Database/Driver/mysql/Connection.php \Drupal\Core\Database\Driver\mysql\Connection::getServerVersion()
- 9 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php \Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion\Connection::getServerVersion()
Gets the server version.
Return value
string The PDO server version.
2 calls to Connection::getServerVersion()
- Connection::getMariaDbVersionMatch in core/
lib/ Drupal/ Core/ Database/ Driver/ mysql/ Connection.php - Gets the MariaDB portion of the server version.
- Connection::version in core/
lib/ Drupal/ Core/ Database/ Driver/ mysql/ Connection.php - Returns the version of the database server.
1 method overrides Connection::getServerVersion()
- Connection::getServerVersion in core/
modules/ system/ tests/ modules/ driver_test/ src/ Driver/ Database/ DrivertestMysqlDeprecatedVersion/ Connection.php - Gets the server version.
File
- core/
lib/ Drupal/ Core/ Database/ Driver/ mysql/ Connection.php, line 308
Class
- Connection
- MySQL implementation of \Drupal\Core\Database\Connection.
Namespace
Drupal\Core\Database\Driver\mysqlCode
protected function getServerVersion() : string {
if (!$this->serverVersion) {
$this->serverVersion = $this->connection
->query('SELECT VERSION()')
->fetchColumn();
}
return $this->serverVersion;
}