W3cubDocs

/Drupal 8

abstract class Schema

Provides a base implementation for Database Schema.

Hierarchy

File

core/lib/Drupal/Core/Database/Schema.php, line 11

Namespace

Drupal\Core\Database

Members

Name Modifiers Type Description
Schema::$connection protected property The database connection.
Schema::$defaultSchema protected property Definition of prefixInfo array structure.
Schema::$placeholder protected property The placeholder counter.
Schema::$uniqueIdentifier protected property A unique identifier for this query object.
Schema::addField abstract public function Add a new field to a table.
Schema::addIndex abstract public function Add an index.
Schema::addPrimaryKey abstract public function Add a primary key.
Schema::addUniqueKey abstract public function Add a unique key.
Schema::buildTableNameCondition protected function Build a condition to match a table name against a standard information_schema.
Schema::changeField abstract public function Change a field definition.
Schema::createTable public function Create a new table from a Drupal table definition.
Schema::dropField abstract public function Drop a field.
Schema::dropIndex abstract public function Drop an index.
Schema::dropPrimaryKey abstract public function Drop the primary key.
Schema::dropTable abstract public function Drop a table.
Schema::dropUniqueKey abstract public function Drop a unique key.
Schema::escapeDefaultValue protected function Return an escaped version of its parameter to be used as a default value on a column.
Schema::fieldExists public function Check if a column exists in the given table.
Schema::fieldNames public function Return an array of field names from an array of key/index column specifiers.
Schema::fieldSetDefault abstract public function Set the default value for a field.
Schema::fieldSetNoDefault abstract public function Set a field to have no default value.
Schema::findTables public function Finds all tables that are like the specified base table name.
Schema::getFieldTypeMap abstract public function Returns a mapping of Drupal schema field names to DB-native field types.
Schema::getPrefixInfo protected function Get information about the table name and schema from the prefix.
Schema::indexExists abstract public function Checks if an index exists in the given table.
Schema::nextPlaceholder public function Returns the next placeholder ID for the query. Overrides PlaceholderInterface::nextPlaceholder
Schema::prefixNonTable function Create names for indexes, primary keys and constraints.
Schema::prepareComment public function Prepare a table or column comment for database query.
Schema::renameTable abstract public function Rename a table.
Schema::tableExists public function Check if a table exists.
Schema::uniqueIdentifier public function Returns a unique identifier for this object. Overrides PlaceholderInterface::uniqueIdentifier
Schema::__clone public function Implements the magic __clone function.
Schema::__construct public function

© 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/core!lib!Drupal!Core!Database!Schema.php/class/Schema/8.1.x