You are here

public static function TransactionSettings::GetBetterDefaults in Drupal driver for SQL Server and SQL Azure 8

Same name and namespace in other branches
  1. 8.2 drivers/lib/Drupal/Driver/Database/sqlsrv/TransactionSettings.php \Drupal\Driver\Database\sqlsrv\TransactionSettings::GetBetterDefaults()

Proposed better defaults.

Return value

TransactionSettings

2 calls to TransactionSettings::GetBetterDefaults()
Connection::pushTransaction in drivers/lib/Drupal/Driver/Database/sqlsrv/Connection.php
Summary of pushTransaction
Insert::execute in drivers/lib/Drupal/Driver/Database/sqlsrv/Insert.php
Executes the insert query.

File

drivers/lib/Drupal/Driver/Database/sqlsrv/TransactionSettings.php, line 87

Class

TransactionSettings
Behaviour settings for a transaction.

Namespace

Drupal\Driver\Database\sqlsrv

Code

public static function GetBetterDefaults() {

  // Use snapshot if available.
  $isolation = DatabaseTransactionIsolationLevel::Ignore();

  // Otherwise use Drupal's default behaviour (except for nesting!)
  return new TransactionSettings(TRUE, DatabaseTransactionScopeOption::Required(), $isolation);
}