function Schema::createKeySql
Same name in this branch
- 9 core/modules/mysql/src/Driver/Database/mysql/Schema.php \Drupal\mysql\Driver\Database\mysql\Schema::createKeySql()
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php \Drupal\Core\Database\Driver\sqlite\Schema::createKeySql()
- 8.9.x core/lib/Drupal/Core/Database/Driver/mysql/Schema.php \Drupal\Core\Database\Driver\mysql\Schema::createKeySql()
- 10 core/modules/sqlite/src/Driver/Database/sqlite/Schema.php \Drupal\sqlite\Driver\Database\sqlite\Schema::createKeySql()
- 10 core/modules/mysql/src/Driver/Database/mysql/Schema.php \Drupal\mysql\Driver\Database\mysql\Schema::createKeySql()
- 11.x core/modules/sqlite/src/Driver/Database/sqlite/Schema.php \Drupal\sqlite\Driver\Database\sqlite\Schema::createKeySql()
- 11.x core/modules/mysql/src/Driver/Database/mysql/Schema.php \Drupal\mysql\Driver\Database\mysql\Schema::createKeySql()
Build the SQL expression for keys.
2 calls to Schema::createKeySql()
- Schema::createColumnsSql in core/
modules/ sqlite/ src/ Driver/ Database/ sqlite/ Schema.php - Build the SQL expression for creating columns.
- Schema::createIndexSql in core/
modules/ sqlite/ src/ Driver/ Database/ sqlite/ Schema.php - Build the SQL expression for indexes.
File
-
core/
modules/ sqlite/ src/ Driver/ Database/ sqlite/ Schema.php, line 113
Class
- Schema
- SQLite implementation of \Drupal\Core\Database\Schema.
Namespace
Drupal\sqlite\Driver\Database\sqliteCode
protected function createKeySql($fields) {
$return = [];
foreach ($fields as $field) {
if (is_array($field)) {
$return[] = $field[0];
}
else {
$return[] = $field;
}
}
return implode(', ', $return);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.