You are here

protected function DatabaseSchema_sqlsrv::createKeySql in Drupal driver for SQL Server and SQL Azure 7

Same name and namespace in other branches
  1. 7.3 sqlsrv/schema.inc \DatabaseSchema_sqlsrv::createKeySql()
  2. 7.2 sqlsrv/schema.inc \DatabaseSchema_sqlsrv::createKeySql()

Return a list of columns for an index definition.

2 calls to DatabaseSchema_sqlsrv::createKeySql()
DatabaseSchema_sqlsrv::addPrimaryKey in sqlsrv/schema.inc
Override DatabaseSchema::addPrimaryKey().
DatabaseSchema_sqlsrv::createIndexSql in sqlsrv/schema.inc
Return the SQL Statement to create an index.

File

sqlsrv/schema.inc, line 294
Database schema code for Microsoft SQL Server database servers.

Class

DatabaseSchema_sqlsrv

Code

protected function createKeySql($fields) {
  $ret = array();
  foreach ($fields as $field) {
    if (is_array($field)) {
      $ret[] = $field[0];
    }
    else {
      $ret[] = $field;
    }
  }
  return implode(', ', $ret);
}