Class to create and manipulate MySQL tables.
Hierarchy
- class DatabaseSchema implements QueryPlaceholderInterface
- class DatabaseSchema_mysql
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
Name | Modifiers | Type | Description |
---|---|---|---|
DatabaseSchema:: |
protected | property | The current database connection. |
DatabaseSchema:: |
protected | property | Definition of prefixInfo array structure. |
DatabaseSchema:: |
protected | property | The placeholder counter. |
DatabaseSchema:: |
protected | property | A unique identifier for this query object. |
DatabaseSchema:: |
public | function | Create a new table from a Backdrop table definition. |
DatabaseSchema:: |
public | function | Check if a column exists in the given table. |
DatabaseSchema:: |
public | function | Return an array of field names from an array of key/index column map. |
DatabaseSchema:: |
public | function |
Returns the next placeholder ID for the query. Overrides QueryPlaceholderInterface:: |
DatabaseSchema:: |
public | function | Create names for indexes, primary keys and constraints. |
DatabaseSchema:: |
public | function | Check if a table exists. |
DatabaseSchema:: |
public | function |
Returns a unique identifier for this object. Overrides QueryPlaceholderInterface:: |
DatabaseSchema:: |
public | function | Implements the magic __clone function. |
DatabaseSchema:: |
public | function | Constructs a database schema object. |
DatabaseSchema_mysql:: |
public | function |
Add a new field to a table. Overrides DatabaseSchema:: |
DatabaseSchema_mysql:: |
public | function |
Add an index. Overrides DatabaseSchema:: |
DatabaseSchema_mysql:: |
public | function |
Add a primary key. Overrides DatabaseSchema:: |
DatabaseSchema_mysql:: |
public | function |
Add a unique key. Overrides DatabaseSchema:: |
DatabaseSchema_mysql:: |
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:: |
DatabaseSchema_mysql:: |
public | function |
Change a field definition. Overrides DatabaseSchema:: |
DatabaseSchema_mysql:: |
constant | Maximum length of a column comment in MySQL. | |
DatabaseSchema_mysql:: |
constant | Maximum length of a table comment in MySQL. | |
DatabaseSchema_mysql:: |
protected | function | Create a SQL string for a field to be used in table creation or alteration. |
DatabaseSchema_mysql:: |
protected | function | Generates a string suitable for creating key across multiple fields. |
DatabaseSchema_mysql:: |
protected | function | Generates a string suitable for creating MySQL table keys. |
DatabaseSchema_mysql:: |
protected | function |
Generate an array of query strings suitable for creating a table. Overrides DatabaseSchema:: |
DatabaseSchema_mysql:: |
public | function |
Drop a field. Overrides DatabaseSchema:: |
DatabaseSchema_mysql:: |
public | function |
Drop an index. Overrides DatabaseSchema:: |
DatabaseSchema_mysql:: |
public | function |
Drop the primary key. Overrides DatabaseSchema:: |
DatabaseSchema_mysql:: |
public | function |
Drop a table. Overrides DatabaseSchema:: |
DatabaseSchema_mysql:: |
public | function |
Drop a unique key. Overrides DatabaseSchema:: |
DatabaseSchema_mysql:: |
public | function |
Set the default value for a field. Overrides DatabaseSchema:: |
DatabaseSchema_mysql:: |
public | function |
Set a field to have no default value. Overrides DatabaseSchema:: |
DatabaseSchema_mysql:: |
public | function |
Find all tables that are like the specified base table name. Overrides DatabaseSchema:: |
DatabaseSchema_mysql:: |
public | function | Retrieve a table or column comment. |
DatabaseSchema_mysql:: |
public | function |
Returns a mapping of Backdrop schema field names to DB-native field types. Overrides DatabaseSchema:: |
DatabaseSchema_mysql:: |
protected | function |
Get information about the table name and schema from the prefix. Overrides DatabaseSchema:: |
DatabaseSchema_mysql:: |
public | function |
Checks if an index exists in the given table. Overrides DatabaseSchema:: |
DatabaseSchema_mysql:: |
public | function |
Prepare a table or column comment for database query. Overrides DatabaseSchema:: |
DatabaseSchema_mysql:: |
protected | function | Set database-engine specific properties for a field. |
DatabaseSchema_mysql:: |
public | function |
Rename a table. Overrides DatabaseSchema:: |