private function Schema::createTechnicalPrimaryKeyIndexSql in Drupal driver for SQL Server and SQL Azure 8
Same name and namespace in other branches
- 3.0.x drivers/lib/Drupal/Driver/Database/sqlsrv/Schema.php \Drupal\Driver\Database\sqlsrv\Schema::createTechnicalPrimaryKeyIndexSql()
 
Create the SQL needed to add a new technical primary key based on a computed column.
File
- drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Schema.php, line 617  - Definition of Drupal\Driver\Database\sqlsrv\Schema
 
Class
Namespace
Drupal\Driver\Database\sqlsrvCode
private function createTechnicalPrimaryKeyIndexSql($table) {
  $result = array();
  $result[] = "{$this->TECHNICAL_PK_COLUMN_NAME} UNIQUEIDENTIFIER DEFAULT NEWID() NOT NULL";
  $result[] = "CONSTRAINT {{$table}}_pkey_technical PRIMARY KEY CLUSTERED ({$this->TECHNICAL_PK_COLUMN_NAME})";
  return implode(' ', $result);
}