You are here

public static function TransactionSettings::GetDefaults 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::GetDefaults()

Returns a default setting system-wide.

Return value

TransactionSettings

1 call to TransactionSettings::GetDefaults()
Connection::startTransaction in drivers/lib/Drupal/Driver/Database/sqlsrv/Connection.php
Overriden to allow transaction settings.

File

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

Class

TransactionSettings
Behaviour settings for a transaction.

Namespace

Drupal\Driver\Database\sqlsrv

Code

public static function GetDefaults() {

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

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