18 #ifndef QGSTRANSACTION_H
19 #define QGSTRANSACTION_H
51 static QgsTransaction* create(
const QString& connString,
const QString& providerKey );
60 bool addLayer(
const QString& layerId );
70 bool begin( QString& errorMsg,
int statementTimeout = 20 );
73 bool commit( QString& errorMsg );
76 bool rollback( QString& errorMsg );
79 virtual bool executeSql(
const QString& sql, QString& error ) = 0;
90 bool mTransactionActive;
91 QSet<QString> mLayers;
95 virtual bool beginTransaction( QString& error,
int statementTimeout ) = 0;
96 virtual bool commitTransaction( QString& error ) = 0;
97 virtual bool rollbackTransaction( QString& error ) = 0;
100 #endif // QGSTRANSACTION_H