function TransactionManager::addClientSavepoint

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

Adds 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.

Overrides TransactionManagerBase::addClientSavepoint

File

core/modules/mysqli/src/Driver/Database/mysqli/TransactionManager.php, line 31

Class

TransactionManager
MySqli implementation of TransactionManagerInterface.

Namespace

Drupal\mysqli\Driver\Database\mysqli

Code

protected function addClientSavepoint(string $name) : bool {
  try {
    return $this->connection
      ->getClientConnection()
      ->savepoint($name);
  } catch (\Exception $e) {
    throw new TransactionException('Failed start of savepoint ' . $name, $e->getCode(), $e);
  }
}

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