You are here

protected function Connection::popCommittableTransactions in Drupal driver for SQL Server and SQL Azure 4.0.x

Same name and namespace in other branches
  1. 4.2.x src/Driver/Database/sqlsrv/Connection.php \Drupal\sqlsrv\Driver\Database\sqlsrv\Connection::popCommittableTransactions()
  2. 3.1.x src/Driver/Database/sqlsrv/Connection.php \Drupal\sqlsrv\Driver\Database\sqlsrv\Connection::popCommittableTransactions()
  3. 4.1.x src/Driver/Database/sqlsrv/Connection.php \Drupal\sqlsrv\Driver\Database\sqlsrv\Connection::popCommittableTransactions()

SQL Server does not support RELEASE SAVEPOINT.

Overrides Connection::popCommittableTransactions

1 call to Connection::popCommittableTransactions()
Connection::rollBack in src/Driver/Database/sqlsrv/Connection.php
Using SQL Server query syntax.

File

src/Driver/Database/sqlsrv/Connection.php, line 450

Class

Connection
Sqlsvr implementation of \Drupal\Core\Database\Connection.

Namespace

Drupal\sqlsrv\Driver\Database\sqlsrv

Code

protected function popCommittableTransactions() {

  // Commit all the committable layers.
  foreach (array_reverse($this->transactionLayers) as $name => $active) {

    // Stop once we found an active transaction.
    if ($active) {
      break;
    }

    // If there are no more layers left then we should commit.
    unset($this->transactionLayers[$name]);
    if (empty($this->transactionLayers)) {
      $this
        ->doCommit();
    }
    else {

      // Nothing to do in SQL Server.
    }
  }
}