|
VSQLite++
0.3
|
transaction is a helper class to start transactions within SQLite More...
#include <transaction.hpp>

Public Member Functions | |
| transaction (connection &con, transaction_type type=transaction_type::undefined) | |
| constructor | |
| ~transaction () | |
| destructor | |
| void | begin (transaction_type type=transaction_type::undefined) |
| Starts a transaction. | |
| void | end () |
| Ends an transaction. | |
| void | commit () |
| Commits a transaction. | |
| void | rollback () |
| Rolls back a transaction. | |
| bool | isActive () const |
| Allow to check if transaction handled by this object is currently active. | |
Private Member Functions | |
| void | exec (std::string const &) |
Private Attributes | |
| connection & | m_con |
| bool | m_isActive |
if true there is a transaction currently opened | |
transaction is a helper class to start transactions within SQLite
Definition at line 62 of file transaction.hpp.
| sqlite::transaction::transaction | ( | connection & | con, |
| transaction_type | type = transaction_type::undefined |
||
| ) |
constructor
| con | a reference to the connection object where the transaction should be started/ended/committed or rolled back |
| type | define the transaction type |
destructor
| void sqlite::transaction::begin | ( | transaction_type | type = transaction_type::undefined | ) |
Starts a transaction.
| type | define the transaction type |
| void sqlite::transaction::commit | ( | ) |
Commits a transaction.
| void sqlite::transaction::end | ( | ) |
Ends an transaction.
| void sqlite::transaction::exec | ( | std::string const & | ) | [private] |
| bool sqlite::transaction::isActive | ( | ) | const [inline] |
Allow to check if transaction handled by this object is currently active.
true if transaction is still active, false otherwise Definition at line 100 of file transaction.hpp.
References m_isActive.
| void sqlite::transaction::rollback | ( | ) |
Rolls back a transaction.
connection& sqlite::transaction::m_con [private] |
Definition at line 103 of file transaction.hpp.
bool sqlite::transaction::m_isActive [private] |
if true there is a transaction currently opened
Definition at line 104 of file transaction.hpp.
Referenced by isActive().
1.7.6.1