public function Connection::prepare in Drupal driver for SQL Server and SQL Azure 8.2
1 call to Connection::prepare()
- Connection::query_execute in drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ PDO/ Connection.php - Custom function to easy querying data without needing to prepare.
File
- drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ PDO/ Connection.php, line 91
Class
Namespace
Drupal\Driver\Database\sqlsrv\PDOCode
public function prepare($query, $options = []) {
// Remove our custom prepare options, otherwise the PDO will
// crash.
$custom = [
self::PDO_RESILIENTRETRY,
self::PDO_RETRYONINTEGRITYVIOLATION,
];
$pdo_options = array_diff_key($options, array_flip($custom));
/** @var Statement */
$statement = parent::prepare($query, $pdo_options);
$statement
->SetConnection($this, $options);
return $statement;
}