protected function Schema::createKeySql in Zircon Profile 8
Same name in this branch
- 8 core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php \Drupal\Core\Database\Driver\sqlite\Schema::createKeySql()
- 8 core/lib/Drupal/Core/Database/Driver/mysql/Schema.php \Drupal\Core\Database\Driver\mysql\Schema::createKeySql()
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Database/Driver/mysql/Schema.php \Drupal\Core\Database\Driver\mysql\Schema::createKeySql()
4 calls to Schema::createKeySql()
- Schema::addIndex in core/
lib/ Drupal/ Core/ Database/ Driver/ mysql/ Schema.php - Add an index.
- Schema::addPrimaryKey in core/
lib/ Drupal/ Core/ Database/ Driver/ mysql/ Schema.php - Add a primary key.
- Schema::addUniqueKey in core/
lib/ Drupal/ Core/ Database/ Driver/ mysql/ Schema.php - Add a unique key.
- Schema::createKeysSql in core/
lib/ Drupal/ Core/ Database/ Driver/ mysql/ Schema.php
File
- core/
lib/ Drupal/ Core/ Database/ Driver/ mysql/ Schema.php, line 361 - Contains \Drupal\Core\Database\Driver\mysql\Schema.
Class
- Schema
- MySQL implementation of \Drupal\Core\Database\Schema.
Namespace
Drupal\Core\Database\Driver\mysqlCode
protected function createKeySql($fields) {
$return = array();
foreach ($fields as $field) {
if (is_array($field)) {
$return[] = '`' . $field[0] . '`(' . $field[1] . ')';
}
else {
$return[] = '`' . $field . '`';
}
}
return implode(', ', $return);
}