Places Wye into transaction mode and increments number of transactions.
If a transaction is already open, throws a PDOException

@todo Flesh out the details for the PDOException properly

@throws PDOException

@return void
490480
public static function beginTransaction()
    {
        if (static::inTransaction()) {
            throw new PDOException();
        }

        static::inTransaction(true);

        $transaction = static::makeTransaction(static::countTransactions());

        static::addTransaction($transaction);
    }
1063395
public function beginTransaction()
	{
		++$this->transactions;

		if ( $this->transactions == 1 )
		{
			try
			{
				$this->getPdo()->beginTransaction();
			}
			catch ( Exception $e )
			{
				--$this->transactions;

				throw $e;
			}
		}
		elseif ( $this->transactions > 1 && $this->queryGrammar->supportsSavepoints() )
		{
			$this->getPdo()->exec( $this->queryGrammar->compileSavepoint( 'trans' . $this->transactions ) );
		}

		$this->fireConnectionEvent( 'beganTransaction' );
	}
1073966
public static function database_transaction_commited() {
        if (self::$dispatching or empty(self::$extbuffer)) {
            return;
        }

        self::$dispatching = true;
        self::process_buffers();
        self::$dispatching = false;
    }
851165
function begin() {
		$this->dbh or $this->setup();

		if ($this->savepoint == 0) {
			\mysqli_autocommit($this->dbh, false);
			\mysqli_begin_transaction($this->dbh);
		}
		else { // already in a transaction
			\mysqli_query($this->dbh, 'SAVEPOINT save'.$this->savepoint);
		}

		$this->savepoint++;
		return $this;
	}
541713
private function dbBeginTransaction()
    {
        if ($this->pendingConnection) {
            $this->connect();
        }

        $this->pendingTransactionBegin[$this->transLevel] = false;

        if ($this->dbTransLevel == 0) {
            //Top level transaction
            $res = pg_query($this->pgConn, 'begin');
        } else {
            $res = pg_query(
                $this->pgConn,
                'savepoint level' . $this->dbTransLevel . 'begin'
            );
        }

        if ($res === false) {
            $this->cleanAfterCommit();
            throw $this->createException();
        }

        $this->dbTransLevel++;

        return $res;
    }
902446
public function commit()
	{
		if( $this->openTransactions == 1 )
		{
			$query = "COMMIT";
			$this->Execute( $query );
		}
		$this->openTransactions--;
		if( $this->openTransactions < 0 )
			$this->openTransactions = 0;
	}
507687
protected function executeInTransaction(string $method) : void
    {
        try {
            $this->database->beginTransaction();

            $this->{$method}();

            $this->database->commit();
        } catch (Exception $exception) {
            $this->database->rollBack();

            $this->handleException($exception);
        }
    }
158955
public function beginTransaction ()
    {
        if(!$this->nestable() || $this->tansaction_level == 0) {
            parent::beginTransaction();
        } else {
            $this->exec("SAVEPOINT LEVEL{$this->transaction_level}");
        }

        $this->transaction_level++;
    }
1064463
public function commit() {
		if (!$this->inTransaction) {
			return false;
		}

		$this->inTransaction = false;
		return $this->pdo->commit();
	}
1284906
public function beginTransaction()
	{
		if($this->supportTransaction == false)
		{
			throw new LikePDOException("This driver doesn't support transactions");
			return false;
		}
		elseif($this->inTransaction == true)
		{
			throw new LikePDOException("There is already an active transaction");
			return false;
		}
		else
		{
			if(!$this->driver->beginTransaction())
			{
				throw new LikePDOException("Failed to begin transaction");
				return false;
			}
			
			return true;
		}
	}
1158535
protected function begin_transaction() {
        if (!$this->transactions_supported()) {
            return;
        }

        $sql = "SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED";
        $this->query_start($sql, NULL, SQL_QUERY_AUX);
        $result = $this->mysqli->query($sql);
        $this->query_end($result);

        $sql = "START TRANSACTION";
        $this->query_start($sql, NULL, SQL_QUERY_AUX);
        $result = $this->mysqli->query($sql);
        $this->query_end($result);
    }
78099
protected function commit_transaction() {
        if (!$this->transactions_supported()) {
            return;
        }

        $sql = "COMMIT";
        $this->query_start($sql, NULL, SQL_QUERY_AUX);
        $result = $this->mysqli->query($sql);
        $this->query_end($result);
    }
962009
public function beginTransaction()
    {
        $this->checkConnection();

        try {
            $this->_pdo->beginTransaction();
            $this->_lastCheckTime = time();
        } catch (\PDOException $e) {
            $this->_error($e->getMessage(), FQDBException::PDO_CODE, $e);
        }
    }
247073
private function commit()
    {
        if ($this->inTransaction) {
            try {
                // commit read-write transaction which also releases the lock
                if ('sqlite' === $this->driver) {
                    $this->pdo->exec('COMMIT');
                } else {
                    $this->pdo->commit();
                }
                $this->inTransaction = false;
            } catch (\PDOException $e) {
                $this->rollback();

                throw $e;
            }
        }
    }
873981
public function commitTransaction()
    {
        try {
            $this->_pdo->commit();
            $this->_lastCheckTime = time();
        } catch (\PDOException $e) {
            $this->rollbackTransaction();
            $this->_error($e->getMessage(), FQDBException::PDO_CODE, $e);
        }
    }
228149
public function commit()
	{
		if($this->_active && $this->_connection->getActive())
		{
			Yii::trace('Committing transaction','system.db.CDbTransaction');
			$this->_connection->getPdoInstance()->commit();
			$this->_active=false;
		}
		else
			throw new CDbException(Yii::t('yii','CDbTransaction is inactive and cannot perform commit or roll back operations.'));
	}
143298
public function commit()
	{
		if($this->inTransaction == true)
		{
			throw new LikePDOException("There is no active transaction");
			return false;
		}
		else
		{
			if(!$this->driver->commitTransaction())
			{
				throw new LikePDOException("Failed to commit transaction");
				return false;
			}
			
			return true;
		}
	}