function TransactionManager::commitClientTransaction

Same name in this branch
  1. 10 core/modules/sqlite/src/Driver/Database/sqlite/TransactionManager.php \Drupal\sqlite\Driver\Database\sqlite\TransactionManager::commitClientTransaction()
  2. 10 core/modules/pgsql/src/Driver/Database/pgsql/TransactionManager.php \Drupal\pgsql\Driver\Database\pgsql\TransactionManager::commitClientTransaction()
Same name in other branches
  1. 11.x core/modules/sqlite/src/Driver/Database/sqlite/TransactionManager.php \Drupal\sqlite\Driver\Database\sqlite\TransactionManager::commitClientTransaction()
  2. 11.x core/modules/mysql/src/Driver/Database/mysql/TransactionManager.php \Drupal\mysql\Driver\Database\mysql\TransactionManager::commitClientTransaction()
  3. 11.x core/modules/pgsql/src/Driver/Database/pgsql/TransactionManager.php \Drupal\pgsql\Driver\Database\pgsql\TransactionManager::commitClientTransaction()

Overrides TransactionManagerBase::commitClientTransaction

File

core/modules/mysql/src/Driver/Database/mysql/TransactionManager.php, line 63

Class

TransactionManager
MySql implementation of TransactionManagerInterface.

Namespace

Drupal\mysql\Driver\Database\mysql

Code

protected function commitClientTransaction() : bool {
    $clientCommit = $this->connection
        ->getClientConnection()
        ->commit();
    $this->setConnectionTransactionState($clientCommit ? ClientConnectionTransactionState::Committed : ClientConnectionTransactionState::CommitFailed);
    return $clientCommit;
}

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