You are here

public function DatabaseSchema_sqlsrv::GetDefaultSchema in Drupal driver for SQL Server and SQL Azure 7

Same name and namespace in other branches
  1. 7.3 sqlsrv/schema.inc \DatabaseSchema_sqlsrv::GetDefaultSchema()
  2. 7.2 sqlsrv/schema.inc \DatabaseSchema_sqlsrv::GetDefaultSchema()

Return active default Schema.

File

sqlsrv/schema.inc, line 53
Database schema code for Microsoft SQL Server database servers.

Class

DatabaseSchema_sqlsrv

Code

public function GetDefaultSchema() {
  $schema =& drupal_static(__FUNCTION__);
  if (!isset($functions)) {
    $state = $this->connection->bypassQueryPreprocess;
    $this->connection->bypassQueryPreprocess = true;
    $schema = $this->connection
      ->query("SELECT SCHEMA_NAME()")
      ->fetchField();
    $this->connection->bypassQueryPreprocess = $state;
  }
  return $schema;
}