kDB: Knowledge DataBase
|
#include <TemporaryTransaction.h>
Classes | |
struct | Private |
Public Member Functions | |
TemporaryTransaction (const QueryConnectionInfo &_connectionInfo) | |
TemporaryTransaction (const Transaction &_transaction, const Connection &_connection) | |
Transaction | transaction () const |
cres_qresult< void > | commitIfOwned () |
cres_qresult< void > | rollback () |
cres_qresult< void > | rollbackIfOwned () |
This class allow to create a transaction if one is not allready created. It is usefull for function that need a transaction to perform and can be passed an optional one as argument
cres_qresult< void > TemporaryTransaction::commitIfOwned | ( | ) |
Commit the underlying transaction if it was created in this temporary transaction, otherwise, it does nothing
cres_qresult< void > TemporaryTransaction::rollback | ( | ) |
Rollback the transaction, no matter if the transaction is created in the TemporaryTransaction or come from somewhere else
cres_qresult< void > TemporaryTransaction::rollbackIfOwned | ( | ) |
Rollback the underlying transaction if it was created in this temporary transaction, otherwise, it does nothing