Connection::schema

public Connection::schema()

Returns a DatabaseSchema object for manipulating the schema.

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

Return value

\Drupal\Core\Database\Schema The database Schema object for this connection.

File

core/lib/Drupal/Core/Database/Connection.php, line 906

Class

Connection
Base Database API class.

Namespace

Drupal\Core\Database

Code

1
2
3
4
5
6
7
public function schema() {
  if (empty($this->schema)) {
    $class = $this->getDriverClass('Schema');
    $this->schema = new $class($this);
  }
  return $this->schema;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.