|
RADLib
RADical C++ application framework
|
RAII transaction that rolls back unless committed. More...
#include <RADDatabase.h>
Public Member Functions | |
| RADSqlTransaction (RADSqlDatabase &database) | |
| Begins a transaction on database. More... | |
| ~RADSqlTransaction () | |
| Rolls back if still active. More... | |
| RADSqlTransaction (const RADSqlTransaction &)=delete | |
| Transactions cannot be copied. More... | |
| RADSqlTransaction & | operator= (const RADSqlTransaction &)=delete |
| Transactions cannot be copied. More... | |
| bool | isActive () const |
| Returns true when begin succeeded and the transaction is active. More... | |
| bool | commit () |
| Commits the transaction. More... | |
| bool | rollback () |
| Rolls back the transaction. More... | |
RAII transaction that rolls back unless committed.
|
explicit |
Begins a transaction on database.
| RADDatabase::RADSqlTransaction::~RADSqlTransaction | ( | ) |
Rolls back if still active.
|
delete |
Transactions cannot be copied.
| bool RADDatabase::RADSqlTransaction::commit | ( | ) |
Commits the transaction.
| bool RADDatabase::RADSqlTransaction::isActive | ( | ) | const |
Returns true when begin succeeded and the transaction is active.
|
delete |
Transactions cannot be copied.
| bool RADDatabase::RADSqlTransaction::rollback | ( | ) |
Rolls back the transaction.