class TransactionManager
Same name in this branch
- 10 core/modules/mysql/src/Driver/Database/mysql/TransactionManager.php \Drupal\mysql\Driver\Database\mysql\TransactionManager
- 10 core/modules/pgsql/src/Driver/Database/pgsql/TransactionManager.php \Drupal\pgsql\Driver\Database\pgsql\TransactionManager
Same name in other branches
- 11.x core/modules/sqlite/src/Driver/Database/sqlite/TransactionManager.php \Drupal\sqlite\Driver\Database\sqlite\TransactionManager
- 11.x core/modules/mysql/src/Driver/Database/mysql/TransactionManager.php \Drupal\mysql\Driver\Database\mysql\TransactionManager
- 11.x core/modules/pgsql/src/Driver/Database/pgsql/TransactionManager.php \Drupal\pgsql\Driver\Database\pgsql\TransactionManager
SQLite implementation of TransactionManagerInterface.
Hierarchy
- class \Drupal\Core\Database\Transaction\TransactionManagerBase implements \Drupal\Core\Database\Transaction\TransactionManagerInterface
- class \Drupal\sqlite\Driver\Database\sqlite\TransactionManager extends \Drupal\Core\Database\Transaction\TransactionManagerBase
Expanded class hierarchy of TransactionManager
File
-
core/
modules/ sqlite/ src/ Driver/ Database/ sqlite/ TransactionManager.php, line 13
Namespace
Drupal\sqlite\Driver\Database\sqliteView source
class TransactionManager extends TransactionManagerBase {
/**
* {@inheritdoc}
*/
protected function beginClientTransaction() : bool {
return $this->connection
->getClientConnection()
->beginTransaction();
}
/**
* {@inheritdoc}
*/
protected function rollbackClientTransaction() : bool {
$clientRollback = $this->connection
->getClientConnection()
->rollBack();
$this->setConnectionTransactionState($clientRollback ? ClientConnectionTransactionState::RolledBack : ClientConnectionTransactionState::RollbackFailed);
return $clientRollback;
}
/**
* {@inheritdoc}
*/
protected function commitClientTransaction() : bool {
$clientCommit = $this->connection
->getClientConnection()
->commit();
$this->setConnectionTransactionState($clientCommit ? ClientConnectionTransactionState::Committed : ClientConnectionTransactionState::CommitFailed);
return $clientCommit;
}
}
Members
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.