Method to commit a transaction.

@param   boolean  $toSavepoint  If true, commit to the last savepoint.

@return  void

@since   1.0
@throws  \RuntimeException
489022
public function transactionCommit($toSavepoint = false)
	{
		$this->connect();

		if (!$toSavepoint || $this->transactionDepth <= 1)
		{
			if ($this->setQuery('COMMIT')->execute())
			{
				$this->transactionDepth = 0;
			}

			return;
		}

		$this->transactionDepth--;
	}
414335
public function commit() {
        if ($this->transactionLevel < 0) throw new RuntimeException('Negative transaction nesting level detected: '.$this->transactionLevel);

        if      (!$this->isConnected())    trigger_error('Not connected', E_USER_WARNING);
        else if (!$this->transactionLevel) trigger_error('No database transaction to commit', E_USER_WARNING);
        else {
            if ($this->transactionLevel == 1)
                $this->execute('commit');
            $this->transactionLevel--;
        }
        return $this;
    }
906250
public function commit() {
        try {
            $this->getTransaction()->commit();
        } catch(DbException $e) {
            if($e->getMessage() != 'There is no active transaction') {
                throw $e;
            }
        }

        $transactions = $this->getTransactions();
        unset($transactions[$this->getDbService()]);
        $this->setTransactions($transactions);

        $this->findEventsManager()->fire(self::EVENT_COMMIT, $this);
    }
1061481
public function transactionSavepoint($savepointName)
	{
		$this->connect();
		$this->setQuery('SAVEPOINT ' . $this->quoteName($this->escape($savepointName)));
		$this->execute();
	}
326798
public function rollback($savepoint = null){
		if(!$this->resource->rollBack()){
			$error = $this->resource->errorInfo();
			throw new DriverException("SQLSTATE[$error[0]]: $error[2]", $error[1]);
		}
	}
1184125
public function commit()
	{
		if( $this->openTransactions < 1 )
			throw new RuntimeException( 'Transaction not opened' );

		if( $this->openTransactions == 1 )
		{
			$this->execute( 'COMMIT' );
			$this->openTransactions--;
			if( self::$autoCommit )
				$this->execute( 'SET AUTOCOMMIT=1' );
		}
	}
297129
function rollback() {
		$this->savepoint--;

		if ($this->savepoint == 0) {
			\mysqli_rollback($this->dbh);
		}
		else { // not finished with transaction
			\mysqli_query('ROLLBACK TO SAVEPOINT save'.$this->savepoint);
		}

		return $this;
	}
499490
public function releaseSavepoint($savepoint)
    {
        if (! $this->getDatabasePlatform()->supportsSavepoints()) {
            throw ConnectionException::savepointsNotSupported();
        }

        if (! $this->platform->supportsReleaseSavepoints()) {
            return;
        }

        $this->getWrappedConnection()->exec($this->platform->releaseSavePoint($savepoint));
    }
1361588
function commit() {
		$this->savepoint--;

		if ($this->savepoint == 0) {
			$this->dbh->commit();
		}
		else { // not finished with transaction yet
			$this->dbh->exec('RELEASE SAVEPOINT save'.$this->savepoint);
		}

		return $this;
	}
568922
public function beginTransaction($savepoint = null){
		if(!$this->resource->beginTransaction()){
			$error = $this->resource->errorInfo();
			throw new DriverException("SQLSTATE[$error[0]]: $error[2]", $error[1]);
		}
	}
1248565
public function commit()
    {
        --$this->currentTransactionLevel;
        if ($this->currentTransactionLevel == 0 || !$this->nestable()) {
            parent::commit();
        } else {
            $this->exec("RELEASE SAVEPOINT LEVEL{$this->currentTransactionLevel}");
        }
    }
855305
public function commit()
    {
        foreach ($this->queue as $key => $item) {
            $ttl = null;
            if (isset($item['ttl'])) {
                $ttl = $item['ttl'];
            }
            $this->save($key, $item['data'], $ttl);
        }
    }
1143837
void save(CallInfo callInfo) {
    access(callInfo, () -> {
      if (!savepointSupport) {
        throw new UnsupportedOperationException("Savepoints are not supported by the database driver.");
      }
      logSetup(callInfo);
      clearSavePointIfSet();
      if (connection.getAutoCommit()) {
        throw new InvalidOperationException("Auto-commit is set for database connection.");
      }      
      savepoint = connection.setSavepoint();
      return 0;
    });
  }
1236796
public function commit() {
        if ($this->txUrl) {
            $this->client->post($this->txUrl . '/fcr:tx/fcr:commit');
            $this->txUrl = null;

            $this->killKeepTransactionAlive();
            $this->reindexResources();
        }
    }
838257
public function commit() {
		if ($this->_transactionDepth === 0) {
			throw new PDOException('Rollback error : There is no transaction started');
		}

		$this->_transactionDepth--;

		if ($this->_transactionDepth === 0) {
			parent::commit();
		} else {
			$this->exec("RELEASE SAVEPOINT LEVEL{$this->_transactionDepth}");
		}
	}
406767
public function transactionCommit()
    {
        if (empty($this->oDb)) {
            $this->connect();
        }

        try {

            $this->oDb->commit();
            $this->transactionRunning = false;

            return true;

        } catch (\Exception $e) {
            throw new TransactionException($e->getMessage(), $e->getCode());
        }
    }
1168446
private static function commit()
    {
        $transaction = env('SIMPLES_TRANSACTION_CLASS', '\\Simples\\Persistence\\Transaction');
        if (!class_exists($transaction)) {
            return;
        }

        if (!method_exists($transaction, 'commit')) {
            throw new ErrorException("The transaction commit method was not found");
        }

        /** @noinspection PhpUnnecessaryFullyQualifiedNameInspection, PhpUndefinedMethodInspection */
        if (!$transaction::commit()) {
            throw new ErrorException("Transaction can't commit the changes");
        }
    }