public function DatabaseConnection::schema

public 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 905
Core systems for the database layer.

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;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!database!database.inc/function/DatabaseConnection::schema/7.x