Rollbacks changes in a transaction.
@param string $savepoint
326798
public function rollback($savepoint = null){
		if(!$this->resource->rollBack()){
			$error = $this->resource->errorInfo();
			throw new DriverException("SQLSTATE[$error[0]]: $error[2]", $error[1]);
		}
	}
69362
protected function rollback_transaction() {
        $this->savepointpresent = false;
        $sql = "RELEASE SAVEPOINT moodle_pg_savepoint; ROLLBACK";
        $this->query_start($sql, null, SQL_QUERY_AUX);
        $result = pg_query($this->pgsql, $sql);
        $this->query_end($result);

        pg_free_result($result);
    }
375719
def rollback_savepoint(self, savepoint):
        
        if not self._platform.is_savepoints_supported():
            raise DBALConnectionError.savepoints_not_supported()
        self.ensure_connected()
        self._platform.rollback_savepoint(savepoint)
1282523
public function transactionStart($asSavepoint = false)
	{
		$this->connect();

		if (!$asSavepoint || !$this->transactionDepth)
		{
			if ($this->setQuery('BEGIN TRANSACTION')->execute())
			{
				$this->transactionDepth = 1;
			}

			return;
		}

		$savepoint = 'SP_' . $this->transactionDepth;
		$this->setQuery('BEGIN TRANSACTION ' . $this->quoteName($savepoint));

		if ($this->execute())
		{
			$this->transactionDepth++;
		}
	}
1296584
def rollback(self):
        """"""
        if self._transaction_nesting_level == 0:
            raise DBALConnectionError.no_active_transaction()

        self.ensure_connected()
        if self._transaction_nesting_level == 1:
            self._transaction_nesting_level = 0
            self._driver.rollback()
            self._is_rollback_only = False
            if not self._auto_commit:
                self.begin_transaction()
        elif self._nest_transactions_with_savepoints:
            self.rollback_savepoint(self._get_nested_transaction_savepoint_name())
            self._transaction_nesting_level -= 1
        else:
            self._is_rollback_only = True
            self._transaction_nesting_level -= 1
1330974
@Override
    public void rollback() throws BackendException {
        Throwable excep = null;
        for (IndexTransaction itx : indexTx.values()) {
            try {
                itx.rollback();
            } catch (Throwable e) {
                excep = e;
            }
        }
        storeTx.rollback();
        if (excep!=null) { //throw any encountered index transaction rollback exceptions
            if (excep instanceof BackendException) throw (BackendException)excep;
            else throw new PermanentBackendException("Unexpected exception",excep);
        }
    }
511288
public function createSavepoint($savepoint)
    {
        if (! $this->getDatabasePlatform()->supportsSavepoints()) {
            throw ConnectionException::savepointsNotSupported();
        }

        $this->getWrappedConnection()->exec($this->platform->createSavePoint($savepoint));
    }
1168065
public function commit($savepoint = null){
		if(!$this->resource->commit()){
			$error = $this->resource->errorInfo();
			throw new DriverException("SQLSTATE[$error[0]]: $error[2]", $error[1]);
		}
	}
1302377
def release_savepoint(self, savepoint):
        
        if not self._platform.is_savepoints_supported():
            raise DBALConnectionError.savepoints_not_supported()
        if self._platform.is_release_savepoints_supported():
            self.ensure_connected()
            self._platform.release_savepoint(savepoint)
1371834
@Override
  public final void
    rollBackTransaction(final String pSavepointName) throws Exception {
    //according https://code.google.com/p/android/issues/detail?id=38706
    //its very easy to make simple things complicated
    if (getLogger().getIsShowDebugMessagesFor(getClass())) {
      getLogger().debug(null, SrvDatabase.class,
        "try to rollback to savepoint: " + pSavepointName);
    }
    executeQuery(";ROLLBACK TRANSACTION TO SAVEPOINT " + pSavepointName + ";");
  }
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();
    }
1147606
public function rollBack() {
		if ($this->transactionManager === null) {
			$this->performRollBack();
			return;
		}
		
		if ($this->transactionManager->hasOpenTransaction()) {
			$this->transactionManager->getRootTransaction()->rollBack();
		}
	}
499490
public function releaseSavepoint($savepoint)
    {
        if (! $this->getDatabasePlatform()->supportsSavepoints()) {
            throw ConnectionException::savepointsNotSupported();
        }

        if (! $this->platform->supportsReleaseSavepoints()) {
            return;
        }

        $this->getWrappedConnection()->exec($this->platform->releaseSavePoint($savepoint));
    }
428856
public function beginTransaction(?string $savepoint = null): self
    {
        if (null === $savepoint) {
            if (!$this->inTransaction()) {
                $this->execute('BEGIN');
            }

        } elseif (!$this->inTransaction()) {
            throw new exceptions\RuntimeException(
                __METHOD__ . ': Savepoints can only be used in transaction blocks'
            );

        } else {
            $this->execute('SAVEPOINT ' . $savepoint);
        }

        return $this;
    }
978927
public function rollBack()
    {
        $this->assertIsSupported($this->supportsTransactions, __METHOD__);
        $this->wrapped->getConnection()->rollBack();
    }
323831
public function rollBack($levels = null): bool
    {
        if(null === $levels)
        {
            $this->transactionLevels = 0;
        }
        else
        {
            $this->transactionLevels -= $levels;
        }
        return true;
    }
1103080
protected function rollback()
    {
        if (! $this->container['migrator']->repositoryExists()) {
            throw new Exception('Migration table not found.');
        }

        $this->container['migrator']->rollback($this->getAttribute('path').'/database/migrations');
    }