You are here

protected function DatabaseSchema_sqlsrv::createIndexSql 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::createIndexSql()
  2. 7.2 sqlsrv/schema.inc \DatabaseSchema_sqlsrv::createIndexSql()

Return the SQL Statement to create an index.

2 calls to DatabaseSchema_sqlsrv::createIndexSql()
DatabaseSchema_sqlsrv::addIndex in sqlsrv/schema.inc
Override DatabaseSchema::addIndex().
DatabaseSchema_sqlsrv::createTable in sqlsrv/schema.inc
Create a new table from a Drupal table definition.

File

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

Class

DatabaseSchema_sqlsrv

Code

protected function createIndexSql($table, $name, $fields) {

  // Here we need to create a computed PERSISTENT column, and index that, when
  // the type is not allowed in an index.
  return 'CREATE INDEX ' . $name . '_idx ON [{' . $table . '}] (' . $this
    ->createKeySql($fields) . ')';
}