A scoped database transaction. More...
#include <SQLDatabase.h++>
Public Member Functions | |
| ScopedTransaction (SQLDatabase &database) throw (SQLException) | |
| Construct a new ScopedTransaction for the given SQLDatabase. | |
| ~ScopedTransaction () throw () | |
| Destructor. | |
| void | commit () throw (SQLException, TimeoutException) |
| Commit the transaction. | |
A scoped database transaction.
ScopedTransaction begins a transaction in its constructor, and automatically rolls back the transaction when it goes out of scope, if the transaction had not previously been committed via a call to commit().
| ScopedTransaction | ( | SQLDatabase & | database | ) | throw (SQLException) |
Construct a new ScopedTransaction for the given SQLDatabase.
| database | The database. |
| SQLException | If a database error occurs. |
| ~ScopedTransaction | ( | ) | throw () |
Destructor.
Rolls back the transaction if it has not been committed via a call commit().
| void commit | ( | ) | throw (SQLException, TimeoutException) |
Commit the transaction.
| SQLException | If a database error occurs. | |
| TimeoutException | If a timeout occurs while waiting for database locks. The call should be retried in this case. |
1.6.3