Class: QgsVectorLayerEditPassthrough

An edit buffer which directly passes commands through, used when a layer is within a transaction.

Class Hierarchy

Inheritance diagram of qgis.core.QgsVectorLayerEditPassthrough

Base classes

QgsVectorLayerEditBuffer

Stores queued vector layer edit operations prior to committing changes to the layer’s data provider.

QObject

class qgis.core.QgsVectorLayerEditPassthrough[source]

Bases: QgsVectorLayerEditBuffer

update(self, transaction: QgsTransaction | None, sql: str | None, name: str | None) bool[source]

Update underlying data with a SQL query embedded in a transaction.

Parameters:
  • transaction (Optional[QgsTransaction]) – Transaction in which the sql query has been run

  • sql (Optional[str]) – The SQL query updating data

  • name (Optional[str]) – The name of the undo/redo command

Return type:

bool

Returns:

True if the undo/redo command is well added to the stack, False otherwise