|
wxSQLite3
5.0.1
|
RAII class for managing transactions. More...
#include <wxsqlite3.h>
Public Member Functions | |
| Transaction (Database *db, TransactionType transactionType=TransactionType::TRANSACTION_DEFAULT) | |
| Constructor. Start the Transaction. | |
| ~Transaction () | |
| Destructor. | |
| void | Commit () |
| Commits the transaction. | |
| void | Rollback () |
| Rolls back the transaction. | |
| bool | IsActive () const |
| Determines whether the transaction is open or not. | |
RAII class for managing transactions.
|
explicit |
Constructor. Start the Transaction.
The constructor starts the transaction.
| db | Pointer to the open Database. The pointer to the database is NOT freed on destruction! |
| transactionType | Type of the transaction to be opened. |
| wxSQLite3::Transaction::~Transaction | ( | ) |
Destructor.
The destructor does nothing if the changes were already commited (see commit()). In case the changes were not committed, a call to the destructor rolls back the transaction.
| void wxSQLite3::Transaction::Commit | ( | ) |
Commits the transaction.
Commits the transaction if active. If not, it does nothing. After the commit, the transaction is not active.
|
inline |
Determines whether the transaction is open or not.
| void wxSQLite3::Transaction::Rollback | ( | ) |
Rolls back the transaction.
Rolls back the transaction if active. If not, it does nothing. After the rollback, the transaction is not active.