function TransactionManager::rollbackClientSavepoint

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::rollbackClientSavepoint()

Rolls back to 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::rollbackClientSavepoint

File

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

Class

TransactionManager
MySql implementation of TransactionManagerInterface.

Namespace

Drupal\mysql\Driver\Database\mysql

Code

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

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