Class to create and manipulate MySQL tables.

Hierarchy

Expanded class hierarchy of DatabaseSchema_mysql

Related topics

File

core/includes/database/mysql/schema.inc, line 15
Database schema code for MySQL database servers.

Members

Contains filters are case sensitive
Namesort descending Modifiers Type Description
DatabaseSchema::$connection protected property The current database connection.
DatabaseSchema::$defaultSchema protected property Definition of prefixInfo array structure.
DatabaseSchema::$placeholder protected property The placeholder counter.
DatabaseSchema::$uniqueIdentifier protected property A unique identifier for this query object.
DatabaseSchema::createTable public function Create a new table from a Backdrop table definition.
DatabaseSchema::fieldExists public function Check if a column exists in the given table.
DatabaseSchema::fieldNames public function Return an array of field names from an array of key/index column map.
DatabaseSchema::nextPlaceholder public function Returns the next placeholder ID for the query. Overrides QueryPlaceholderInterface::nextPlaceholder
DatabaseSchema::prefixNonTable public function Create names for indexes, primary keys and constraints.
DatabaseSchema::tableExists public function Check if a table exists.
DatabaseSchema::uniqueIdentifier public function Returns a unique identifier for this object. Overrides QueryPlaceholderInterface::uniqueIdentifier
DatabaseSchema::__clone public function Implements the magic __clone function.
DatabaseSchema::__construct public function Constructs a database schema object.
DatabaseSchema_mysql::addField public function Add a new field to a table. Overrides DatabaseSchema::addField
DatabaseSchema_mysql::addIndex public function Add an index. Overrides DatabaseSchema::addIndex
DatabaseSchema_mysql::addPrimaryKey public function Add a primary key. Overrides DatabaseSchema::addPrimaryKey
DatabaseSchema_mysql::addUniqueKey public function Add a unique key. Overrides DatabaseSchema::addUniqueKey
DatabaseSchema_mysql::buildTableNameCondition protected function MySQL uses databases like schemas rather than catalogs so when we build a condition to query the information_schema.tables, we set the default database as the schema unless specified otherwise, and exclude table_catalog from the condition criteria. Overrides DatabaseSchema::buildTableNameCondition
DatabaseSchema_mysql::changeField public function Change a field definition. Overrides DatabaseSchema::changeField
DatabaseSchema_mysql::COMMENT_MAX_COLUMN constant Maximum length of a column comment in MySQL.
DatabaseSchema_mysql::COMMENT_MAX_TABLE constant Maximum length of a table comment in MySQL.
DatabaseSchema_mysql::createFieldSql protected function Create a SQL string for a field to be used in table creation or alteration.
DatabaseSchema_mysql::createKeySql protected function Generates a string suitable for creating key across multiple fields.
DatabaseSchema_mysql::createKeysSql protected function Generates a string suitable for creating MySQL table keys.
DatabaseSchema_mysql::createTableSql protected function Generate an array of query strings suitable for creating a table. Overrides DatabaseSchema::createTableSql
DatabaseSchema_mysql::dropField public function Drop a field. Overrides DatabaseSchema::dropField
DatabaseSchema_mysql::dropIndex public function Drop an index. Overrides DatabaseSchema::dropIndex
DatabaseSchema_mysql::dropPrimaryKey public function Drop the primary key. Overrides DatabaseSchema::dropPrimaryKey
DatabaseSchema_mysql::dropTable public function Drop a table. Overrides DatabaseSchema::dropTable
DatabaseSchema_mysql::dropUniqueKey public function Drop a unique key. Overrides DatabaseSchema::dropUniqueKey
DatabaseSchema_mysql::fieldSetDefault public function Set the default value for a field. Overrides DatabaseSchema::fieldSetDefault
DatabaseSchema_mysql::fieldSetNoDefault public function Set a field to have no default value. Overrides DatabaseSchema::fieldSetNoDefault
DatabaseSchema_mysql::findTables public function Find all tables that are like the specified base table name. Overrides DatabaseSchema::findTables
DatabaseSchema_mysql::getComment public function Retrieve a table or column comment.
DatabaseSchema_mysql::getFieldTypeMap public function Returns a mapping of Backdrop schema field names to DB-native field types. Overrides DatabaseSchema::getFieldTypeMap
DatabaseSchema_mysql::getPrefixInfo protected function Get information about the table name and schema from the prefix. Overrides DatabaseSchema::getPrefixInfo
DatabaseSchema_mysql::indexExists public function Checks if an index exists in the given table. Overrides DatabaseSchema::indexExists
DatabaseSchema_mysql::prepareComment public function Prepare a table or column comment for database query. Overrides DatabaseSchema::prepareComment
DatabaseSchema_mysql::processField protected function Set database-engine specific properties for a field.
DatabaseSchema_mysql::renameTable public function Rename a table. Overrides DatabaseSchema::renameTable