You are here

public function Insert::__construct in Drupal driver for SQL Server and SQL Azure 8.2

Constructs an Insert object.

Parameters

\Drupal\Core\Database\Connection $connection: A Connection object.

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

array $options: Array of database options.

Overrides Insert::__construct

File

drivers/lib/Drupal/Driver/Database/sqlsrv/Insert.php, line 45
Definition of Drupal\Driver\Database\sqlsrv\Insert

Class

Insert

Namespace

Drupal\Driver\Database\sqlsrv

Code

public function __construct($connection, $table, array $options = []) {
  if (!isset($options['return'])) {

    // We use internally the OUTPUT function to retrieve
    // inserted ID's
    $options['return'] = Database::RETURN_NULL;
  }
  parent::__construct($connection, $table, $options);
}