protected function Schema::createKeySql

Same name in this branch
  1. 9.x drupal/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php \Drupal\Core\Database\Driver\mysql\Schema::createKeySql()
  2. 9.x drupal/core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php \Drupal\Core\Database\Driver\sqlite\Schema::createKeySql()

Build the SQL expression for keys.

2 calls to Schema::createKeySql()
Schema::createColumsSql in drupal/core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php
Build the SQL expression for creating columns.
Schema::createIndexSql in drupal/core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php
Build the SQL expression for indexes.

File

drupal/core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php, line 103
Definition of Drupal\Core\Database\Driver\sqlite\Schema

Class

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(', ', $return);
}