DatabaseConnection::popTransaction

  1. drupal
    1. 8
    2. 7
Versions
7 public DatabaseConnection::popTransaction($name)

Decreases the depth of transaction nesting.

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 return because the transaction may have manually been rolled back.

@throws DatabaseTransactionCommitFailedException

Parameters

$name The name of the savepoint

Throws

DatabaseTransactionNoActiveException

See also

DatabaseTransaction

Code

includes/database/database.inc, line 1095

<?php
public function popTransaction($name) {
  if (!$this->supportsTransactions()) {
    return;
  }
  if (!isset($this->transactionLayers[$name])) {
    throw new DatabaseTransactionNoActiveException();
  }

  // Mark this layer as committable.
  $this->transactionLayers[$name] = FALSE;
  $this->popCommittableTransactions();
}
?>