function Connection::transactionDepth

Same name in other branches
  1. 9 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::transactionDepth()
  2. 10 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::transactionDepth()

Determines the current transaction depth.

Return value

int The current transaction depth.

1 call to Connection::transactionDepth()
Connection::inTransaction in core/lib/Drupal/Core/Database/Connection.php
Determines if there is an active transaction open.

File

core/lib/Drupal/Core/Database/Connection.php, line 1101

Class

Connection
Base Database API class.

Namespace

Drupal\Core\Database

Code

public function transactionDepth() {
    return count($this->transactionLayers);
}

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