DatabaseConnection::schema

  1. drupal
    1. 8
    2. 7
Versions
7 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.

Code

includes/database/database.inc, line 886

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