5 m_dbTransaction( dbTransaction ){
9 m_dbTransaction( trans.m_dbTransaction ){
13 if( m_dbTransaction.isActive() ) {
19 return m_dbTransaction.start( readOnly );
23 return m_dbTransaction.commit( );
27 return m_dbTransaction.rollback( );
31 return m_dbTransaction.isActive( checkIfReadOnly );
bool start(bool readOnly=true)
Starts a new transaction. Returns the success of the operation.
ScopedTransaction(Transaction &dbTransaction)
bool commit()
Commits the transaction.
bool isActive(bool checkIfReadOnly=false) const
Checks if the transaction is active.
virtual ~ScopedTransaction()
Default destructor.
bool rollback()
Rolls back the transaction.