| Versionen | |
|---|---|
| drupal7 | public DatabaseConnection::popTransaction() |
Decreases the depth of transaction nesting, committing or rolling back if necessary.
If we pop off the last transaction layer, then we either commit or roll back the transaction as necessary. If no transaction is active, we throw an exception.
includes/
<?php
public function popTransaction() {
if ($this->transactionLayers == 0) {
throw new NoActiveTransactionException();
}
--$this->transactionLayers;
if ($this->transactionLayers == 0 && $this->supportsTransactions()) {
if ($this->willRollBack) {
parent::rollBack();
}
else {
parent::commit();
}
}
}
?>
Kommentare
Kommentar hinzufügen