You are here

public function Connection::version in Drupal 8

Same name in this branch
  1. 8 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::version()
  2. 8 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php \Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion\Connection::version()
Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::version()

Returns the version of the database server.

1 call to Connection::version()
Connection::upsert in core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php
Prepares and returns an UPSERT query object.
1 method overrides Connection::version()
Connection::version in core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php
Returns the version of the database server.

File

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

Class

Connection
Base Database API class.

Namespace

Drupal\Core\Database

Code

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