You are here

public function Scheme::GetDefaultSchema in Drupal driver for SQL Server and SQL Azure 8.2

Return active default Schema.

1 call to Scheme::GetDefaultSchema()
Scheme::TableDetailsGet in drivers/lib/Drupal/Driver/Database/sqlsrv/Scheme.php
Database introspection: fetch technical information about a table.

File

drivers/lib/Drupal/Driver/Database/sqlsrv/Scheme.php, line 307

Class

Scheme

Namespace

Drupal\Driver\Database\sqlsrv

Code

public function GetDefaultSchema() {
  if ($cache = $this->cnn
    ->Cache('sqlsrv-engine')
    ->Get('default_schema')) {
    return $cache->data;
  }
  $result = $this->cnn
    ->query_execute("SELECT SCHEMA_NAME()")
    ->fetchField();
  $this->cnn
    ->Cache('sqlsrv-engine')
    ->Set('default_schema', $result);
  return $result;
}