protected function DatabaseSchema_sqlsrv::LoadDefaultSchema in Drupal driver for SQL Server and SQL Azure 7.2
Same name and namespace in other branches
- 7.3 sqlsrv/schema.inc \DatabaseSchema_sqlsrv::LoadDefaultSchema()
Load the real default schema name for this connection.
1 call to DatabaseSchema_sqlsrv::LoadDefaultSchema()
- DatabaseSchema_sqlsrv::__construct in sqlsrv/
schema.inc
File
- sqlsrv/
schema.inc, line 98 - Database schema code for Microsoft SQL Server database servers.
Class
Code
protected function LoadDefaultSchema($connection) {
if ($cache = fastcache::cache_get('default_schema', 'schema')) {
$this->defaultSchema = $cache->data;
return;
}
$result = $connection
->query_direct("SELECT SCHEMA_NAME()")
->fetchField();
fastcache::cache_set('default_schema', $result, 'schema');
$this->defaultSchema = $result;
}