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/pgsql/src/Driver/Database/pgsql/TransactionManager.php, line 25

Class

TransactionManager
PostgreSql implementation of TransactionManagerInterface.

Namespace

Drupal\pgsql\Driver\Database\pgsql

Code

protected function rollbackClientTransaction() : bool {
  $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.