function DatabaseSchema_sqlite::createKeySql

Build the SQL expression for keys.

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

File

includes/database/sqlite/schema.inc, line 95

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.