Error message

You are browsing documentation for drupal 7.x, which is not supported anymore. Read the updated version of this page for drupal 11.x (the latest version).

function DatabaseConnection::schema

Returns a DatabaseSchema object for manipulating the schema.

This method will lazy-load the appropriate schema library file.

Return value

DatabaseSchema The DatabaseSchema object for this connection.

File

includes/database/database.inc, line 966

Class

DatabaseConnection
Base Database API class.

Code

public function schema() {
 if (empty($this->schema )) {
 $class = $this->getDriverClass ('DatabaseSchema', array(
 'schema.inc',
 ));
 if (class_exists ($class)) {
 $this->schema  = new $class($this);
 }
 }
 return $this->schema ;
}

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