ManaPHP\Db::rollback PHP Method

rollback() public method

Rollbacks the active transaction in the connection
public rollback ( ) : void
return void
    public function rollback()
    {
        if ($this->_transactionLevel === 0) {
            throw new DbException('There is no active transaction');
        }
        $this->_transactionLevel--;
        if ($this->_transactionLevel === 0) {
            $this->fireEvent('db:rollbackTransaction');
            if (!$this->_pdo->rollBack()) {
                throw new DbException('rollBack failed.');
            }
        }
    }