ManaPHP\Db::commit PHP Méthode

commit() public méthode

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