function TransactionManager::rollbackClientTransaction
Rolls back a client transaction.
Return value
bool Returns TRUE on success or FALSE on failure.
Overrides TransactionManagerBase::rollbackClientTransaction
File
-
core/
modules/ mysql/ src/ Driver/ Database/ mysql/ TransactionManager.php, line 75
Class
- TransactionManager
- MySql implementation of TransactionManagerInterface.
Namespace
Drupal\mysql\Driver\Database\mysqlCode
protected function rollbackClientTransaction() : bool {
if (!$this->connection
->getClientConnection()
->inTransaction()) {
$this->voidClientTransaction();
return FALSE;
}
$clientRollback = $this->connection
->getClientConnection()
->rollBack();
$this->setConnectionTransactionState($clientRollback ? ClientConnectionTransactionState::RolledBack : ClientConnectionTransactionState::RollbackFailed);
return $clientRollback;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.