libdballe
9.11
|
A RAII transaction interface for SQL transactions. More...
#include <sql.h>
Public Member Functions | |
Transaction (const Transaction &)=delete | |
Transaction & | operator= (const Transaction &)=delete |
virtual void | commit ()=0 |
Commit this transaction. | |
virtual void | rollback ()=0 |
Roll back this transaction. | |
virtual void | rollback_nothrow () noexcept=0 |
Roll back this transaction. | |
virtual void | lock_table (const char *name)=0 |
Get an exclusive lock on the given table until the end of the transaction. | |
A RAII transaction interface for SQL transactions.
The transaction will be valid during the lifetime of this object.
You can commit or rollback the transaction using its methods. If at destruction time the transaction has not been committed or rolled back, a rollback is automatically performed.