protected function Connection::popCommittableTransactions in Zircon Profile 8
Same name in this branch
- 8 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::popCommittableTransactions()
- 8 core/lib/Drupal/Core/Database/Driver/mysql/Connection.php \Drupal\Core\Database\Driver\mysql\Connection::popCommittableTransactions()
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::popCommittableTransactions()
Internal function: commit all the transaction layers that can commit.
2 calls to Connection::popCommittableTransactions()
- Connection::popTransaction in core/
lib/ Drupal/ Core/ Database/ Connection.php - Decreases the depth of transaction nesting.
- Connection::rollback in core/
lib/ Drupal/ Core/ Database/ Connection.php - Rolls back the transaction entirely or to a named savepoint.
1 method overrides Connection::popCommittableTransactions()
- Connection::popCommittableTransactions in core/
lib/ Drupal/ Core/ Database/ Driver/ mysql/ Connection.php - Overridden to work around issues to MySQL not supporting transactional DDL.
File
- core/
lib/ Drupal/ Core/ Database/ Connection.php, line 1177 - Contains \Drupal\Core\Database\Connection.
Class
- Connection
- Base Database API class.
Namespace
Drupal\Core\DatabaseCode
protected function popCommittableTransactions() {
// Commit all the committable layers.
foreach (array_reverse($this->transactionLayers) as $name => $active) {
// Stop once we found an active transaction.
if ($active) {
break;
}
// If there are no more layers left then we should commit.
unset($this->transactionLayers[$name]);
if (empty($this->transactionLayers)) {
if (!$this->connection
->commit()) {
throw new TransactionCommitFailedException();
}
}
else {
$this
->query('RELEASE SAVEPOINT ' . $name);
}
}
}