protected function DatabaseSchema_sqlite::createKeySql

7.x schema.inc protected DatabaseSchema_sqlite::createKeySql($fields)

Build the SQL expression for keys.

2 calls to DatabaseSchema_sqlite::createKeySql()
DatabaseSchema_sqlite::createColumsSql in drupal-7.x/includes/database/sqlite/schema.inc
Build the SQL expression for creating columns.
DatabaseSchema_sqlite::createIndexSql in drupal-7.x/includes/database/sqlite/schema.inc
Build the SQL expression for indexes.

File

drupal-7.x/includes/database/sqlite/schema.inc, line 95
Database schema code for SQLite databases.

Class

DatabaseSchema_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);
}