function TransactionManager::releaseClientSavepoint

Same name and namespace in other branches
  1. 11.x core/modules/mysql/src/Driver/Database/mysql/TransactionManager.php \Drupal\mysql\Driver\Database\mysql\TransactionManager::releaseClientSavepoint()
  2. 11.x core/modules/mysqli/src/Driver/Database/mysqli/TransactionManager.php \Drupal\mysqli\Driver\Database\mysqli\TransactionManager::releaseClientSavepoint()

Releases a savepoint on the client transaction.

This is a generic implementation. Drivers should override this method to use a method specific for their client connection.

Parameters

string $name: The name of the savepoint.

Return value

bool Returns TRUE on success or FALSE on failure.

Overrides TransactionManagerBase::releaseClientSavepoint

File

core/modules/mysql/src/Driver/Database/mysql/TransactionManager.php, line 52

Class

TransactionManager
MySql implementation of TransactionManagerInterface.

Namespace

Drupal\mysql\Driver\Database\mysql

Code

protected function releaseClientSavepoint(string $name) : bool {
  if (!$this->connection
    ->getClientConnection()
    ->inTransaction()) {
    $this->voidClientTransaction();
    return TRUE;
  }
  return parent::releaseClientSavepoint($name);
}

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