function Connection::popCommittableTransactions
Same name in this branch
- 9 core/modules/mysql/src/Driver/Database/mysql/Connection.php \Drupal\mysql\Driver\Database\mysql\Connection::popCommittableTransactions()
Commit all the transaction layers that can commit.
@internal
File
-
core/
lib/ Drupal/ Core/ Database/ Connection.php, line 1714
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)) {
$this->doCommit();
}
else {
$this->query('RELEASE SAVEPOINT ' . $name);
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.