function StubTransactionManager::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/tests/Drupal/Tests/Core/Database/Stub/StubTransactionManager.php, line 31

Class

StubTransactionManager
A stub of the TransactionManagerBase class for testing purposes.

Namespace

Drupal\Tests\Core\Database\Stub

Code

protected function addClientSavepoint(string $name) : bool {
  return $this->success ? TRUE : throw new TransactionException('Failed start of savepoint ' . $name);
}

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