VSQLite++  0.3
Public Member Functions | Private Member Functions | Private Attributes | List of all members
sqlite::transaction Struct Reference

transaction is a helper class to start transactions within SQLite More...

#include <transaction.hpp>

Collaboration diagram for sqlite::transaction:
Collaboration graph

Public Member Functions

 transaction (connection &con, transaction_type type=transaction_type::undefined)
 constructor More...
 
 ~transaction ()
 destructor More...
 
void begin (transaction_type type=transaction_type::undefined)
 Starts a transaction. More...
 
void end ()
 Ends an transaction. More...
 
void commit ()
 Commits a transaction. More...
 
void rollback ()
 Rolls back a transaction. More...
 
bool isActive () const
 Allow to check if transaction handled by this object is currently active. More...
 

Private Member Functions

void exec (std::string const &)
 

Private Attributes

connectionm_con
 
bool m_isActive
 if true there is a transaction currently opened More...
 

Detailed Description

transaction is a helper class to start transactions within SQLite

Definition at line 62 of file transaction.hpp.

Constructor & Destructor Documentation

§ transaction()

sqlite::transaction::transaction ( connection con,
transaction_type  type = transaction_type::undefined 
)

constructor

Parameters
cona reference to the connection object where the transaction should be started/ended/committed or rolled back
typedefine the transaction type

§ ~transaction()

sqlite::transaction::~transaction ( )

destructor

Member Function Documentation

§ begin()

void sqlite::transaction::begin ( transaction_type  type = transaction_type::undefined)

Starts a transaction.

Parameters
typedefine the transaction type

§ commit()

void sqlite::transaction::commit ( )

Commits a transaction.

§ end()

void sqlite::transaction::end ( )

Ends an transaction.

§ exec()

void sqlite::transaction::exec ( std::string const &  )
private

§ isActive()

bool sqlite::transaction::isActive ( ) const
inline

Allow to check if transaction handled by this object is currently active.

Returns
true if transaction is still active, false otherwise

Definition at line 100 of file transaction.hpp.

§ rollback()

void sqlite::transaction::rollback ( )

Rolls back a transaction.

Member Data Documentation

§ m_con

connection& sqlite::transaction::m_con
private

Definition at line 103 of file transaction.hpp.

§ m_isActive

bool sqlite::transaction::m_isActive
private

if true there is a transaction currently opened

Definition at line 104 of file transaction.hpp.


The documentation for this struct was generated from the following file: