function TransactionManagerBase::addClientSavepoint
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Database/Transaction/TransactionManagerBase.php \Drupal\Core\Database\Transaction\TransactionManagerBase::addClientSavepoint()
- 10 core/lib/Drupal/Core/Database/Transaction/TransactionManagerBase.php \Drupal\Core\Database\Transaction\TransactionManagerBase::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.
Throws
\Drupal\Core\Database\TransactionException When the database operation failed.
1 call to TransactionManagerBase::addClientSavepoint()
- TransactionManagerBase::push in core/
lib/ Drupal/ Core/ Database/ Transaction/ TransactionManagerBase.php - Pushes a new Drupal transaction on the stack.
2 methods override TransactionManagerBase::addClientSavepoint()
- StubTransactionManager::addClientSavepoint in core/
tests/ Drupal/ Tests/ Core/ Database/ Stub/ StubTransactionManager.php - Adds a savepoint on the client transaction.
- TransactionManager::addClientSavepoint in core/
modules/ mysqli/ src/ Driver/ Database/ mysqli/ TransactionManager.php - Adds a savepoint on the client transaction.
File
-
core/
lib/ Drupal/ Core/ Database/ Transaction/ TransactionManagerBase.php, line 695
Class
- TransactionManagerBase
- The database transaction manager base class.
Namespace
Drupal\Core\Database\TransactionCode
protected function addClientSavepoint(string $name) : bool {
try {
$this->connection
->query('SAVEPOINT ' . $name);
return TRUE;
} 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.