public function DatabaseConnection::inTransaction

Determines if there is an active transaction open.

Return value

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

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

File

drupal/includes/database/database.inc, line 1016
Core systems for the database layer.

Class

DatabaseConnection
Base Database API class.

Code

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