You are here

public function InsertQuery_sqlsrv::__construct in Drupal driver for SQL Server and SQL Azure 7.3

Same name and namespace in other branches
  1. 7.2 sqlsrv/query.inc \InsertQuery_sqlsrv::__construct()

Constructs an InsertQuery object.

Parameters

DatabaseConnection $connection: A DatabaseConnection object.

string $table: Name of the table to associate with this query.

array $options: Array of database options.

Overrides InsertQuery::__construct

File

sqlsrv/query.inc, line 16

Class

InsertQuery_sqlsrv
SQL Server-specific implementation of INSERT.

Code

public function __construct($connection, $table, array $options = []) {
  global $conf;
  if (isset($conf['MSSQL_INSERT_DISABLE_OUTPUT']) && $conf['MSSQL_INSERT_DISABLE_OUTPUT'] === TRUE) {
    $this->use_output = FALSE;
  }
  if (!isset($options['return'])) {
    $options['return'] = Database::RETURN_NULL;
  }
  parent::__construct($connection, $table, $options);
}