ManaPHP\Db::commit PHP 메소드

commit() 공개 메소드

Commits the active transaction in the connection
public commit ( ) : void
리턴 void
    public function commit()
    {
        if ($this->_transactionLevel === 0) {
            throw new DbException('There is no active transaction');
        }
        $this->_transactionLevel--;
        if ($this->_transactionLevel === 0) {
            $this->fireEvent('db:commitTransaction');
            if (!$this->_pdo->commit()) {
                throw new DbException('commit failed.');
            }
        }
    }