function DatabaseConnection::inTransaction

Determines if there is an active transaction open.

Return value

TRUE if we're currently in a transaction, FALSE otherwise.

6 calls to DatabaseConnection::inTransaction()
DatabaseConnection::pushTransaction in includes/database/database.inc
Increases the depth of transaction nesting.
DatabaseConnection::rollback in includes/database/database.inc
Rolls back the transaction entirely or to a named savepoint.
DatabaseConnection_mysql::rollback in includes/database/mysql/database.inc
Rolls back the transaction entirely or to a named savepoint.
DatabaseConnection_sqlite::popTransaction in includes/database/sqlite/database.inc
Decreases the depth of transaction nesting.
DatabaseConnection_sqlite::pushTransaction in includes/database/sqlite/database.inc
Increases the depth of transaction nesting.

... See full list

File

includes/database/database.inc, line 1063

Class

DatabaseConnection
Base Database API class.

Code

public function inTransaction() {
    return $this->transactionDepth() > 0;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.