Class: QgsTransactionGroup

Represents a transaction group.

Class Hierarchy

Inheritance diagram of qgis.core.QgsTransactionGroup

Base classes

QObject

Methods

addLayer

Add a layer to this transaction group.

connString

Returns the connection string used by this transaction group.

isEmpty

Returns True if there are no layers in this transaction group.

layers

Gets the set of layers currently managed by this transaction group.

modified

Returns True if any of the layers in this group reports a modification.

providerKey

Returns the provider key used by this transaction group.

Signals

commitError

Will be emitted whenever there is a commit error

class qgis.core.QgsTransactionGroup[source]

Bases: QObject

__init__(parent: QObject | None = None)

Constructor for QgsTransactionGroup

Parameters:

parent (Optional[QObject] = None)

addLayer(self, layer: QgsVectorLayer | None) bool[source]

Add a layer to this transaction group.

Will return True if it is compatible and has been added.

Parameters:

layer (Optional[QgsVectorLayer])

Return type:

bool

signal commitError(msg: str)[source]

Will be emitted whenever there is a commit error

Parameters:

msg (str)

connString(self) str[source]

Returns the connection string used by this transaction group. Layers need be compatible when added.

Return type:

str

isEmpty(self) bool[source]

Returns True if there are no layers in this transaction group.

Return type:

bool

layers(self) Set[QgsVectorLayer]

Gets the set of layers currently managed by this transaction group.

Return type:

Set[QgsVectorLayer]

Returns:

Layer set

modified(self) bool[source]

Returns True if any of the layers in this group reports a modification.

Return type:

bool

providerKey(self) str[source]

Returns the provider key used by this transaction group. Layers need be compatible when added.

Return type:

str