public function Connection::commit in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::commit()
Throws an exception to deny direct access to transaction commits.
We do not want to allow users to commit transactions at any time, only by destroying the transaction object or allowing it to go out of scope. A direct commit bypasses all of the safety checks we've built on top of PDO's transaction routines.
Throws
\Drupal\Core\Database\TransactionExplicitCommitNotAllowedException
See also
\Drupal\Core\Database\Transaction
File
- core/
lib/ Drupal/ Core/ Database/ Connection.php, line 1357 - Contains \Drupal\Core\Database\Connection.
Class
- Connection
- Base Database API class.
Namespace
Drupal\Core\DatabaseCode
public function commit() {
throw new TransactionExplicitCommitNotAllowedException();
}