Leosac  0.8.0
Open Source Access Control
Leosac::db::MultiplexedTransaction Class Reference

Acts like an odb::transaction, with the exception that it will becomes the active transaction at construction, and will retore the previous (if any) transaction when it gets destroyed. More...

#include <MultiplexedTransaction.hpp>

+ Collaboration diagram for Leosac::db::MultiplexedTransaction:

Public Member Functions

 MultiplexedTransaction (odb::transaction_impl *impl)
 
 ~MultiplexedTransaction ()
 
void commit ()
 Commit the transaction. More...
 
void rollback ()
 Rollback the transaction. More...
 

Private Attributes

bool had_previous_
 
std::unique_ptr< odb::transaction > transaction_
 
odb::transaction * previous_
 

Detailed Description

Acts like an odb::transaction, with the exception that it will becomes the active transaction at construction, and will retore the previous (if any) transaction when it gets destroyed.

Definition at line 35 of file MultiplexedTransaction.hpp.

Constructor & Destructor Documentation

◆ MultiplexedTransaction()

MultiplexedTransaction::MultiplexedTransaction ( odb::transaction_impl *  impl)

Definition at line 27 of file MultiplexedTransaction.cpp.

◆ ~MultiplexedTransaction()

MultiplexedTransaction::~MultiplexedTransaction ( )

Definition at line 38 of file MultiplexedTransaction.cpp.

Member Function Documentation

◆ commit()

void MultiplexedTransaction::commit ( )

Commit the transaction.

The call is forward to the real odb::transaction object.

Definition at line 47 of file MultiplexedTransaction.cpp.

◆ rollback()

void MultiplexedTransaction::rollback ( )

Rollback the transaction.

Definition at line 52 of file MultiplexedTransaction.cpp.

Member Data Documentation

◆ had_previous_

bool Leosac::db::MultiplexedTransaction::had_previous_
private

Definition at line 54 of file MultiplexedTransaction.hpp.

◆ previous_

odb::transaction* Leosac::db::MultiplexedTransaction::previous_
private

Definition at line 56 of file MultiplexedTransaction.hpp.

◆ transaction_

std::unique_ptr<odb::transaction> Leosac::db::MultiplexedTransaction::transaction_
private

Definition at line 55 of file MultiplexedTransaction.hpp.


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