transaction is a helper class to start transactions within SQLite
More...
#include <transaction.hpp>
|
| void | exec (std::string const &) |
transaction is a helper class to start transactions within SQLite
Definition at line 69 of file transaction.hpp.
◆ transaction()
constructor
- Parameters
-
| con | a reference to the connection object where the transaction should be started/ended/committed or rolled back |
| type | define the transaction type |
References sqlite::v2::undefined.
◆ ~transaction()
| sqlite::v2::transaction::~transaction |
( |
| ) |
|
◆ begin()
◆ commit()
| void sqlite::v2::transaction::commit |
( |
| ) |
|
◆ end()
| void sqlite::v2::transaction::end |
( |
| ) |
|
◆ exec()
| void sqlite::v2::transaction::exec |
( |
std::string const & | | ) |
|
|
private |
◆ isActive()
| bool sqlite::v2::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 107 of file transaction.hpp.
References m_isActive.
◆ isEnding()
| bool sqlite::v2::transaction::isEnding |
( |
| ) |
const |
|
inline |
◆ open_snapshot()
| void sqlite::v2::transaction::open_snapshot |
( |
snapshot const & | snap, |
|
|
std::string_view | schema = "main" ) |
Re-open this transaction so it reads from the supplied snapshot.
◆ rollback()
| void sqlite::v2::transaction::rollback |
( |
| ) |
|
Rolls back a transaction.
◆ take_snapshot()
| snapshot sqlite::v2::transaction::take_snapshot |
( |
std::string_view | schema = "main" | ) |
|
Capture a consistent snapshot for the current transaction.
- Parameters
-
| schema | Database schema name (defaults to "main"). |
◆ m_con
◆ m_isActive
| bool sqlite::v2::transaction::m_isActive {false} |
|
private |
◆ m_isEnding
| bool sqlite::v2::transaction::m_isEnding {false} |
|
private |
The documentation for this struct was generated from the following file: