wxSQLite3 3.3.0

- Main Page
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
wxSQLite3Transaction Class Reference

RAII class for managing transactions. More...

`#include <wxsqlite3.h>`

## Public Member Functions
| wxSQLite3Transaction (wxSQLite3Database *db, wxSQLite3TransactionType transactionType=WXSQLITE_TRANSACTION_DEFAULT)
| Constructor. Start the Transaction. More...
| ~wxSQLite3Transaction ()
| Destructor. More...
void | Commit ()
| Commits the transaction. More...
void | Rollback ()
| Rolls back the transaction. More...
bool | IsActive ()
| Determins wether the transaction is open or not. More...

## Detailed Description

RAII class for managing transactions.

## Constructor & Destructor Documentation

wxSQLite3Transaction::wxSQLite3Transaction | ( | wxSQLite3Database * | db,
|  | wxSQLite3TransactionType | transactionType = `WXSQLITE_TRANSACTION_DEFAULT`
| ) |  |
| explicit

Constructor. Start the Transaction.

The constructor starts the transaction.

Parameters

  db | Pointer to the open Database. The pointer to the database is NOT freed on destruction!
  transactionType | Type of the transaction to be opened.

wxSQLite3Transaction::~wxSQLite3Transaction | ( |  | ) |

Destructor.

The destructor does nothing if the changes were already commited (see commit()). In case the changes were not commited, a call to the destructor rolls back the transaction.

## Member Function Documentation

void wxSQLite3Transaction::Commit | ( |  | ) |

Commits the transaction.

Commits the transaction if active. If not, it does nothing. After the commit, the transaction is not active.

bool wxSQLite3Transaction::IsActive | ( |  | ) |
| inline

Determins wether the transaction is open or not.

Returns
  TRUE if the constructor successfully opend the transaction, false otherwise. After committing the transaction, active returns false.

void wxSQLite3Transaction::Rollback | ( |  | ) |

Rolls back the transaction.

Rolls back the transaction if active. If not, it does nothing. After the rollback, the transaction is not active.

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

- wxsqlite3.h
- wxsqlite3.cpp