Run the rollback command.

@param string $database
@param string $path
@param bool   $step
@param bool   $force
543258
protected function runRollback($database, $path, $step, $force)
    {
        $this->call(
            'mongolid-migrate:rollback',
            [
                '--database' => $database,
                '--path' => $path,
                '--realpath' => $this->input->getOption('realpath'),
                '--step' => $step,
                '--force' => $force,
            ]
        );
    }
950804
public function rollback()
    {
        if (!$this->started) {
            throw new \RuntimeException('Cannot rollback transaction before start');
        }
        if (!$this->pdo->rollBack()) {
            throw new \RuntimeException('Failed to rollback transaction');
        }

        $this->started = false;
    }
58516
public function rollBack()
    {
        if ($this->transactionNestingLevel === 0) {
            throw ConnectionException::noActiveTransaction();
        }

        $connection = $this->getWrappedConnection();

        $logger = $this->_config->getSQLLogger();

        if ($this->transactionNestingLevel === 1) {
            if ($logger) {
                $logger->startQuery('"ROLLBACK"');
            }
            $this->transactionNestingLevel = 0;
            $connection->rollBack();
            $this->isRollbackOnly = false;
            if ($logger) {
                $logger->stopQuery();
            }

            if ($this->autoCommit === false) {
                $this->beginTransaction();
            }
        } elseif ($this->nestTransactionsWithSavepoints) {
            if ($logger) {
                $logger->startQuery('"ROLLBACK TO SAVEPOINT"');
            }
            $this->rollbackSavepoint($this->_getNestedTransactionSavePointName());
            --$this->transactionNestingLevel;
            if ($logger) {
                $logger->stopQuery();
            }
        } else {
            $this->isRollbackOnly = true;
            --$this->transactionNestingLevel;
        }
    }
778801
function rollback()
    {
        if ( is_array( $this->TransactionStackTree ) )
        {
            // All transactions were rollbacked, reset the tree.
            $this->TransactionStackTree = array();
        }
        $ini = eZINI::instance();
        if ($ini->variable( "DatabaseSettings", "Transactions" ) == "enabled")
        {
            if ( $this->TransactionCounter <= 0 )
            {
                eZDebug::writeError( 'No transaction in progress, cannot rollback', __METHOD__ );
                return false;
            }
            // Reset the transaction counter
            $this->TransactionCounter = 0;
            if ( $this->isConnected() )
            {
                $oldRecordError = $this->RecordError;
                // Turn off error handling while we rollback
                $this->RecordError = false;
                $this->rollbackQuery();
                $this->RecordError = $oldRecordError;
            }
        }
        return true;
    }
199801
public function rollback(Node $node, Application $application, Deployment $deployment, array $options = [])
    {
        if (!isset($options['rollbackCommand'])) {
            return;
        }

        $replacePaths = [
            '{deploymentPath}' => $application->getDeploymentPath(),
            '{sharedPath}' => $application->getSharedPath(),
            '{releasePath}' => $deployment->getApplicationReleasePath($application),
            '{currentPath}' => $application->getReleasesPath() . '/current',
            '{previousPath}' => $application->getReleasesPath() . '/previous'
        ];

        $command = $options['rollbackCommand'];
        $command = str_replace(array_keys($replacePaths), $replacePaths, $command);

        $this->shell->execute($command, $node, $deployment, true);
    }
208097
public void rollback() throws SQLException {

    cmdPrologue();

    lock.lock();
    try {

      if (inTransaction()) {
        executeQuery("ROLLBACK");
      }

    } catch (Exception e) {
      /* eat exception */
    } finally {
      lock.unlock();
    }
  }
735750
static void rollback(Connection connection) {
        if (connection != null)
            try {
                connection.rollback();
                log.debug("rolled back");
            } catch (SQLException e) {
                throw new SQLRuntimeException(e);
            }
    }
1012145
public function force_transaction_rollback() {
        if ($this->transactions) {
            try {
                $this->rollback_transaction();
            } catch (dml_exception $e) {
                // ignore any sql errors here, the connection might be broken
            }
        }

        // now enable transactions again
        $this->transactions = array();
        $this->force_rollback = false;

        \core\event\manager::database_transaction_rolledback();
        \core\message\manager::database_transaction_rolledback();
    }
108470
public function rollback() {
        if ($this->transactionLevel < 0) throw new RuntimeException('Negative transaction nesting level detected: '.$this->transactionLevel);

        if      (!$this->isConnected())    trigger_error('Not connected', E_USER_WARNING);
        else if (!$this->transactionLevel) trigger_error('No database transaction to roll back', E_USER_WARNING);
        else {
            if ($this->transactionLevel == 1)
                $this->execute('rollback');
            $this->transactionLevel--;
        }
        return $this;
    }
1174388
public function down(Table $table, $id, $step = 1)
    {
        return $this->_move($table, $id, $step, self::TYPE_DOWN);
    }
200794
protected function runReset($database, $path)
    {
        $this->call('migrate:reset', array_filter([
            '--database' => $database,
            '--path' => $path,
            '--realpath' => $this->input->getOption('realpath'),
            '--force' => true,
        ]));
    }
1039211
def rollback(name, database=None, directory=None, verbose=None):
    """"""
    router = get_router(directory, database, verbose)
    router.rollback(name)
596287
void rollback() {
		if (connection != null) {
			try {
				connection.rollback();
			} catch (SQLException e) {
				throw new UroborosqlSQLException(e);
			}
		}
		clearState();
	}
664030
public static function rollback(string $instance = Pool::INSTANCE)
    {
        /* @var AbstractDbConnection $connection */
        $connection = self::getTransactionConnection($instance);
        if ($connection === null) {
            throw new DbException('No transaction needs to be rolled back');
        }

        $connection->rollback();
        self::closetTransactionContext($connection, $instance);
    }
1205399
protected function _rollBack()
    {
        $this->_connect();
        $this->_connection->rollback();
        $this->_connection->autocommit(true);
    }
147011
public function rollBack()
	{
		if ( $this->transactionCount < 1 ) {
			return;
		}
		$transaction = $this->unprepared( "ROLLBACK;" );
		if ( false !== $transaction ) {
			$this->transactionCount --;
		}
	}
241343
public function execute(bool $force = false): void
	{
		if($force || $this->confirm('<yellow>Are you sure you want to reset your database?</yellow>'))
		{
			$this->nl();

			$this->rollback();

			return;
		}

		$this->nl();

		$this->write('Ok, no action was performed.');
	}