W3cubDocs

/Drupal 8

class Schema

PostgreSQL implementation of \Drupal\Core\Database\Schema.

Hierarchy

Related topics

Schema API
API to handle database schemas.

File

core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php, line 18

Namespace

Drupal\Core\Database\Driver\pgsql

Members

Name Modifiers Type Description
Schema::$connection protected property The database connection.
Schema::$defaultSchema protected property Definition of prefixInfo array structure.
Schema::$maxIdentifierLength protected property The maximum allowed length for index, primary key and constraint names.
Schema::$placeholder protected property The placeholder counter.
Schema::$tableInformation protected property A cache of information about blob columns and sequences of tables.
Schema::$uniqueIdentifier protected property A unique identifier for this query object.
Schema::addField public function Add a new field to a table. Overrides Schema::addField
Schema::addIndex public function Add an index. Overrides Schema::addIndex
Schema::addPrimaryKey public function Add a primary key. Overrides Schema::addPrimaryKey
Schema::addUniqueKey function Add a unique key. Overrides Schema::addUniqueKey
Schema::buildTableNameCondition protected function Build a condition to match a table name against a standard information_schema.
Schema::changeField public function Change a field definition. Overrides Schema::changeField
Schema::constraintExists public function Helper function: check if a constraint (PK, FK, UK) exists.
Schema::createFieldSql protected function Create an SQL string for a field to be used in table creation or alteration.
Schema::createPrimaryKeySql protected function Create the SQL expression for primary keys.
Schema::createTable public function Create a new table from a Drupal table definition.
Schema::createTableSql protected function Generate SQL to create a new table from a Drupal schema definition.
Schema::dropField public function Drop a field. Overrides Schema::dropField
Schema::dropIndex public function Drop an index. Overrides Schema::dropIndex
Schema::dropPrimaryKey public function Drop the primary key. Overrides Schema::dropPrimaryKey
Schema::dropTable public function Drop a table. Overrides Schema::dropTable
Schema::dropUniqueKey public function Drop a unique key. Overrides Schema::dropUniqueKey
Schema::ensureIdentifiersLength protected function Make sure to limit identifiers according to PostgreSQL compiled in length.
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 public function Set the default value for a field. Overrides Schema::fieldSetDefault
Schema::fieldSetNoDefault public function Set a field to have no default value. Overrides Schema::fieldSetNoDefault
Schema::findTables public function Finds all tables that are like the specified base table name.
Schema::getComment public function Retrieve a table or column comment.
Schema::getFieldTypeMap function This maps a generic data type in combination with its data size to the engine-specific data type. Overrides Schema::getFieldTypeMap
Schema::getPrefixInfo protected function Get information about the table name and schema from the prefix.
Schema::hashBase64 protected function Calculates a base-64 encoded, PostgreSQL-safe sha-256 hash per PostgreSQL documentation: 4.1. Lexical Structure.
Schema::indexExists public function Checks if an index exists in the given table. Overrides Schema::indexExists
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::processField protected function Set database-engine specific properties for a field.
Schema::queryFieldInformation public function Fetch the list of CHECK constraints used on a field.
Schema::queryTableInformation public function Fetch the list of blobs and sequences used on a table.
Schema::renameTable function Rename a table. Overrides Schema::renameTable
Schema::resetTableInformation protected function Resets information about table blobs, sequences and serial fields.
Schema::tableExists public function Check if a table exists. Overrides Schema::tableExists
Schema::uniqueIdentifier public function Returns a unique identifier for this object. Overrides PlaceholderInterface::uniqueIdentifier
Schema::_createIndexSql protected function
Schema::_createKeys protected function
Schema::_createKeySql protected function
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!Driver!pgsql!Schema.php/class/Schema/8.1.x