kDB: Knowledge DataBase
Loading...
Searching...
No Matches
kDB::Repository::TemporaryTransaction Class Reference

#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 ()
 

Detailed Description

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

Member Function Documentation

◆ commitIfOwned()

cres_qresult< void > TemporaryTransaction::commitIfOwned ( )

Commit the underlying transaction if it was created in this temporary transaction, otherwise, it does nothing

◆ rollback()

cres_qresult< void > TemporaryTransaction::rollback ( )

Rollback the transaction, no matter if the transaction is created in the TemporaryTransaction or come from somewhere else

◆ rollbackIfOwned()

cres_qresult< void > TemporaryTransaction::rollbackIfOwned ( )

Rollback the underlying transaction if it was created in this temporary transaction, otherwise, it does nothing


The documentation for this class was generated from the following files: