public function Connection::inTransaction in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::inTransaction()
Determines if there is an active transaction open.
Return value
bool TRUE if we're currently in a transaction, FALSE otherwise.
5 calls to Connection::inTransaction()
- Connection::addSavepoint in core/
lib/ Drupal/ Core/ Database/ Driver/ pgsql/ Connection.php - Add a new savepoint with a unique name.
- Connection::pushTransaction in core/
lib/ Drupal/ Core/ Database/ Connection.php - Increases the depth of transaction nesting.
- Connection::query in core/
lib/ Drupal/ Core/ Database/ Driver/ pgsql/ Connection.php - Executes a query string against the database.
- Connection::rollBack in core/
lib/ Drupal/ Core/ Database/ Connection.php - Rolls back the transaction entirely or to a named savepoint.
- Connection::rollBack in core/
lib/ Drupal/ Core/ Database/ Driver/ mysql/ Connection.php - Rolls back the transaction entirely or to a named savepoint.
File
- core/
lib/ Drupal/ Core/ Database/ Connection.php, line 1470
Class
- Connection
- Base Database API class.
Namespace
Drupal\Core\DatabaseCode
public function inTransaction() {
return $this
->transactionDepth() > 0;
}