You are here

public function Schema::engineVersion in Drupal driver for SQL Server and SQL Azure 8

Same name and namespace in other branches
  1. 3.0.x drivers/lib/Drupal/Driver/Database/sqlsrv/Schema.php \Drupal\Driver\Database\sqlsrv\Schema::engineVersion()

Retrieve Engine Version information.

Return value

array Engine version.

1 call to Schema::engineVersion()
Schema::engineVersionNumber in drivers/lib/Drupal/Driver/Database/sqlsrv/Schema.php
Retrieve Major Engine Version Number as integer.

File

drivers/lib/Drupal/Driver/Database/sqlsrv/Schema.php, line 425
Definition of Drupal\Driver\Database\sqlsrv\Schema

Class

Schema

Namespace

Drupal\Driver\Database\sqlsrv

Code

public function engineVersion() {
  if (!isset($this->engineVersion)) {
    $this->engineVersion = $this->connection
      ->query_direct(<<<EOF
          SELECT CONVERT (varchar,SERVERPROPERTY('productversion')) AS VERSION,
          CONVERT (varchar,SERVERPROPERTY('productlevel')) AS LEVEL,
          CONVERT (varchar,SERVERPROPERTY('edition')) AS EDITION
EOF
)
      ->fetchAssoc();
  }
  return $this->engineVersion;
}