You are here

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

Same name and namespace in other branches
  1. 8.2 drivers/lib/Drupal/Driver/Database/sqlsrv/Connection.php \Drupal\Driver\Database\sqlsrv\Connection::popCommittableTransactions()
  2. 8 drivers/lib/Drupal/Driver/Database/sqlsrv/Connection.php \Drupal\Driver\Database\sqlsrv\Connection::popCommittableTransactions()

SQL Server does not support RELEASE SAVEPOINT.

Overrides Connection::popCommittableTransactions

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

File

drivers/lib/Drupal/Driver/Database/sqlsrv/Connection.php, line 511

Class

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

Namespace

Drupal\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.
    }
  }
}