ManaPHP\Db::commit PHP Method

commit() public method

Commits the active transaction in the connection
public commit ( ) : void
return 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.');
            }
        }
    }