function Connection::version

Returns the version of the database server.

Assumes the client connection is \PDO. Non-PDO based drivers need to override this method.

Return value

string

Overrides Connection::version

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/modules/mysql/src/Driver/Database/mysql/Connection.php, line 266

Class

Connection
MySQL implementation of \Drupal\Core\Database\Connection.

Namespace

Drupal\mysql\Driver\Database\mysql

Code

public function version() {
  if ($this->isMariaDb()) {
    return $this->getMariaDbVersionMatch();
  }
  return $this->getServerVersion();
}

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