Schema::createTableSql

public Schema::createTableSql($name, $table) Generate SQL to create a new table from a Drupal schema definition. Parameters $name: The name of the table to create. $table: A Schema API table definition array. Return value An array of SQL statements to create the table. File core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php, line 47 Class Schema SQLite implementation of \Drupal\Core\Database\Schema. Namespace Drupal\Core\Database\Driver\sqlite Code public function createTableSql(

Schema::createTableSql

protected Schema::createTableSql($name, $table) Generate SQL to create a new table from a Drupal schema definition. Parameters $name: The name of the table to create. $table: A Schema API table definition array. Return value An array of SQL statements to create the table. File core/lib/Drupal/Core/Database/Driver/mysql/Schema.php, line 94 Class Schema MySQL implementation of \Drupal\Core\Database\Schema. Namespace Drupal\Core\Database\Driver\mysql Code protected function createTableS

Schema::createTable

public Schema::createTable($name, $table) Create a new table from a Drupal table definition. Parameters $name: The name of the table to create. $table: A Schema API table definition array. Throws \Drupal\Core\Database\SchemaObjectExistsException If the specified table already exists. File core/lib/Drupal/Core/Database/Schema.php, line 592 Class Schema Provides a base implementation for Database Schema. Namespace Drupal\Core\Database Code public function createTable($name, $table) {

Schema::createPrimaryKeySql

protected Schema::createPrimaryKeySql($fields) Create the SQL expression for primary keys. Postgresql does not support key length. It does support fillfactor, but that requires a separate database lookup for each column in the key. The key length defined in the schema is ignored. File core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php, line 427 Class Schema PostgreSQL implementation of \Drupal\Core\Database\Schema. Namespace Drupal\Core\Database\Driver\pgsql Code protected function

Schema::createKeysSql

protected Schema::createKeysSql($spec) File core/lib/Drupal/Core/Database/Driver/mysql/Schema.php, line 272 Class Schema MySQL implementation of \Drupal\Core\Database\Schema. Namespace Drupal\Core\Database\Driver\mysql Code protected function createKeysSql($spec) { $keys = array(); if (!empty($spec['primary key'])) { $keys[] = 'PRIMARY KEY (' . $this->createKeySql($spec['primary key']) . ')'; } if (!empty($spec['unique keys'])) { foreach ($spec['unique keys'] as $ke

Schema::createKeySql

protected Schema::createKeySql($fields) Build the SQL expression for keys. File core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php, line 99 Class Schema SQLite implementation of \Drupal\Core\Database\Schema. Namespace Drupal\Core\Database\Driver\sqlite Code protected function createKeySql($fields) { $return = array(); foreach ($fields as $field) { if (is_array($field)) { $return[] = $field[0]; } else { $return[] = $field; } } return implode(', ',

Schema::createKeySql

protected Schema::createKeySql($fields) File core/lib/Drupal/Core/Database/Driver/mysql/Schema.php, line 356 Class Schema MySQL implementation of \Drupal\Core\Database\Schema. Namespace Drupal\Core\Database\Driver\mysql Code protected function createKeySql($fields) { $return = array(); foreach ($fields as $field) { if (is_array($field)) { $return[] = '`' . $field[0] . '`(' . $field[1] . ')'; } else { $return[] = '`' . $field . '`'; } } return implode

Schema::createIndexSql

protected Schema::createIndexSql($tablename, $schema) Build the SQL expression for indexes. File core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php, line 56 Class Schema SQLite implementation of \Drupal\Core\Database\Schema. Namespace Drupal\Core\Database\Driver\sqlite Code protected function createIndexSql($tablename, $schema) { $sql = array(); $info = $this->getPrefixInfo($tablename); if (!empty($schema['unique keys'])) { foreach ($schema['unique keys'] as $key =>

Schema::createFieldSql

protected Schema::createFieldSql($name, $spec) Create an SQL string for a field to be used in table creation or alteration. Before passing a field out of a schema definition into this function it has to be processed by _db_process_field(). Parameters $name: Name of the field. $spec: The field specification, as per the schema data structure format. File core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php, line 279 Class Schema PostgreSQL implementation of \Drupal\Core\Database\Schema.

Schema::createFieldSql

protected Schema::createFieldSql($name, $spec) Create an SQL string for a field to be used in table creation or alteration. Before passing a field out of a schema definition into this function it has to be processed by db_processField(). Parameters $name: Name of the field. $spec: The field specification, as per the schema data structure format. File core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php, line 156 Class Schema SQLite implementation of \Drupal\Core\Database\Schema. Names