class TransactionSettings in Drupal driver for SQL Server and SQL Azure 8
Same name and namespace in other branches
- 8.2 drivers/lib/Drupal/Driver/Database/sqlsrv/TransactionSettings.php \Drupal\Driver\Database\sqlsrv\TransactionSettings
Behaviour settings for a transaction.
Hierarchy
- class \Drupal\Driver\Database\sqlsrv\TransactionSettings
Expanded class hierarchy of TransactionSettings
6 files declare their use of TransactionSettings
- Connection.php in drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Connection.php - Definition of Drupal\Driver\Database\sqlsrv\Connection
- Insert.php in drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Insert.php - Definition of Drupal\Driver\Database\sqlsrv\Insert
- Merge.php in drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Merge.php - Definition of Drupal\Driver\Database\sqlsrv\Merge
- Schema.php in drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Schema.php - Definition of Drupal\Driver\Database\sqlsrv\Schema
- Transaction.php in drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Transaction.php - Definition of Drupal\Driver\Database\sqlsrv\Transaction
File
- drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ TransactionSettings.php, line 13
Namespace
Drupal\Driver\Database\sqlsrvView source
class TransactionSettings {
/**
* Summary of __construct
* @param mixed $Sane
* @param DatabaseTransactionScopeOption $ScopeOption
* @param DatabaseTransactionIsolationLevel $IsolationLevel
*/
public function __construct($Sane = FALSE, DatabaseTransactionScopeOption $ScopeOption = NULL, DatabaseTransactionIsolationLevel $IsolationLevel = NULL) {
$this->_Sane = $Sane;
if ($ScopeOption == NULL) {
$ScopeOption = DatabaseTransactionScopeOption::RequiresNew();
}
if ($IsolationLevel == NULL) {
$IsolationLevel = DatabaseTransactionIsolationLevel::Unspecified();
}
$this->_IsolationLevel = $IsolationLevel;
$this->_ScopeOption = $ScopeOption;
}
// @var DatabaseTransactionIsolationLevel
private $_IsolationLevel;
// @var DatabaseTransactionScopeOption
private $_ScopeOption;
// @var Boolean
private $_Sane;
/**
* Summary of Get_IsolationLevel
* @return mixed
*/
public function Get_IsolationLevel() {
return $this->_IsolationLevel;
}
/**
* Summary of Get_ScopeOption
* @return mixed
*/
public function Get_ScopeOption() {
return $this->_ScopeOption;
}
/**
* Summary of Get_Sane
* @return mixed
*/
public function Get_Sane() {
return $this->_Sane;
}
/**
* Returns a default setting system-wide.
*
* @return TransactionSettings
*/
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);
}
/**
* Proposed better defaults.
*
* @return TransactionSettings
*/
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);
}
/**
* Snapshot isolation is not compatible with DDL operations.
*
* @return TransactionSettings
*/
public static function GetDDLCompatibleDefaults() {
return new TransactionSettings(TRUE, DatabaseTransactionScopeOption::Required(), DatabaseTransactionIsolationLevel::ReadCommitted());
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TransactionSettings:: |
private | property | ||
TransactionSettings:: |
private | property | ||
TransactionSettings:: |
private | property | ||
TransactionSettings:: |
public static | function | Proposed better defaults. | |
TransactionSettings:: |
public static | function | Snapshot isolation is not compatible with DDL operations. | |
TransactionSettings:: |
public static | function | Returns a default setting system-wide. | |
TransactionSettings:: |
public | function | Summary of Get_IsolationLevel | |
TransactionSettings:: |
public | function | Summary of Get_Sane | |
TransactionSettings:: |
public | function | Summary of Get_ScopeOption | |
TransactionSettings:: |
public | function | Summary of __construct |