You are here

public function Statement::SetConnection in Drupal driver for SQL Server and SQL Azure 8.2

Set a reference to the connection.

Parameters

Connection $cnn:

File

drivers/lib/Drupal/Driver/Database/sqlsrv/PDO/Statement.php, line 85

Class

Statement
Turbocharged Statement class to work with MSSQL server.

Namespace

Drupal\Driver\Database\sqlsrv\PDO

Code

public function SetConnection(Connection $cnn, array $options = []) {

  // Custom PDO options
  $this->options = array_merge([
    Connection::PDO_RESILIENTRETRY => false,
    Connection::PDO_RETRYONINTEGRITYVIOLATION => false,
  ], $options);
  $this->cnn = $cnn;
}