protected Connection::popCommittableTransactions()
Internal function: commit all the transaction layers that can commit.
File
- core/lib/Drupal/Core/Database/Connection.php, line 1169
Class
- Connection
- Base Database API class.
Namespace
Drupal\Core\Database
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 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 ); } } } |
Please login to continue.