starts a database transaction
@return bool
487381
public function startTransaction(): bool {
        if ($this->transactionExists) {
            return false;
        }
        $started = $this->pdo->beginTransaction();
        $this->transactionExists = $started;
        return $started;
    }
596611
public function startTransaction()
    {
        # Ensure we have a connection to start the transaction on
        $this->connect();

        switch ($this->mode) {

            case "mysql":
                $result = $this->server->autocommit(false);
                break;

            case "postgres":
                $result = $this->query("SET AUTOCOMMIT = OFF");
                break;

            case "redshift":
                $result = $this->query("START TRANSACTION");
                break;

            case "odbc":
                $result = odbc_autocommit($this->server, false);
                break;

            default:
                throw new \Exception("startTransaction() not supported in this mode (" . $this->mode . ")");
        }

        if (!$result) {
            $this->error();
        }

        $this->transaction = true;

        return true;
    }
969477
public function beginTransaction()
    {
        ++$this->transactions;

        if ($this->transactions == 1) {
            $this->pdo->beginTransaction();
        }

        $this->fireConnectionEvent('beganTransaction');
    }
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;
		}
	}
156162
public function startTransaction()
    {

        if (!is_a($this->resourceId, "mysqli")) {
            throw new QueryException("No valid db resource Id found. This is required to start a transaction");
            return false;
        }
        $this->resourceId->autocommit(FALSE); //Turns autocommit off;

    }
695713
public function beginTransaction()
    {
        $this->connect();
        if ($this->_connection->inTransaction()) {
            return true;
        }

        return $this->_connection->beginTransaction();
    }
968485
public function beginTransaction()
    {
        $return = $this->repository->beginTransaction();

        if ($this->signalDispatcher instanceof TransactionHandler) {
            $this->signalDispatcher->beginTransaction();
        }

        return $return;
    }
886792
public function beginTransaction() {
		$this->connect();
		
		if ($this->txStatus == self::TX_NOT_STARTED) {
			$this->txStatus = self::TX_STARTED;
			$this->txCounter = 1;
			return $this->driver->begin();
		}
		
		$this->txCounter++;
		return false;
	}
827152
public function begin() {
        if ($this->transactionLevel < 0) throw new RuntimeException('Negative transaction nesting level detected: '.$this->transactionLevel);

        if (!$this->transactionLevel)
            $this->execute('start transaction');

        $this->transactionLevel++;
        return $this;
    }
603724
public function beginTransaction()
    {
        // auto reconnect
        $this->connect();
        
        $this->isTransaction = true;
        $this->connection->autocommit(false);//关闭自动提交
        return ;
    }
1156777
public function commitTransaction() {
        // check that a transaction is really active - do not check/renew the connection - renewing a connection breaks the transaction
        if (!$this->getConnection(false)->inTransaction())
            throw new \Exception("Not inside a DB transaction. Cannot commit.");

        try {
            $this->getConnection(false)->commit();
        } catch (Exception $_e) {
            throw new \Exception("Error while committing DB transaction: ".$pe->getMessage());
        }
    }
1263117
protected function beginTransaction()
    {
        $modelClass = $this->modelClass;
        $transaction = $modelClass::getDb()->beginTransaction();

        $this->_transaction[] = $transaction;
    }
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);
    }
427322
public function start( $autoCommit = 1 )
	{
		$this->openTransactions ++;
		if( $this->openTransactions == 1 )
		{
			if( $autoCommit )
			{
				$query = "SET AUTOCOMMIT=0";
			}
			$this->Execute( $query );
			$query = "START TRANSACTION";
			$this->Execute ($query);
		}
	}
612495
public function begin()
    {
        $this->current = $this->current instanceof Transaction
            ? $this->current->newTransaction()
            : new Transaction;
    }
1349554
public function beginTransaction()
    {
        try {
            $this->connection->beginTransaction();
        } catch (DBALException $e) {
            throw new OrmException("Unable to start transaction.\n" . $e->getMessage(), 0, $e);
        }
    }
659589
public function start() {
        if ($this->dialect) {
            //允许事务嵌套
            $this->transLevel += 1;
            $dialect          = $this->dialect;
            if ($dialect->inTransaction()) {
                return true;
            }
            $rst = $dialect->beginTransaction();
            if ($rst) {
                return true;
            } else {
                $this->transLevel -= 1;
            }
        }

        return false;
    }