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 |
knowCore::ReturnVoid | commitIfOwned () |
knowCore::ReturnVoid | rollback () |
knowCore::ReturnVoid | 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
knowCore::ReturnVoid TemporaryTransaction::commitIfOwned | ( | ) |
Commit the underlying transaction if it was created in this temporary transaction, otherwise, it does nothing
knowCore::ReturnVoid TemporaryTransaction::rollback | ( | ) |
Rollback the transaction, no matter if the transaction is created in the TemporaryTransaction or come from somewhere else
knowCore::ReturnVoid TemporaryTransaction::rollbackIfOwned | ( | ) |
Rollback the underlying transaction if it was created in this temporary transaction, otherwise, it does nothing