|
nanodbc
A small C++ wrapper for the native C ODBC API
|
A resource for managing transaction commits and rollbacks. More...
#include <nanodbc.h>
Public Member Functions | |
| transaction (const class connection &conn) | |
| Begin a transaction on the given connection object. | |
| void | swap (transaction &rhs) noexcept |
| Member swap. | |
| void | commit () |
| Commits transaction immediately. | |
| void | rollback () noexcept |
| Marks this transaction for rollback. | |
| class connection & | connection () noexcept |
| Returns the connection object. | |
| const class connection & | connection () const noexcept |
| Returns the connection object. | |
| operator class connection & () noexcept | |
| Returns the connection object. | |
| operator const class connection & () const noexcept | |
| Returns the connection object. | |
A resource for managing transaction commits and rollbacks.
Copies share one transaction. If it has not been committed when the last copy is destroyed, it rolls back any modifying operations.
|
explicit |
Begin a transaction on the given connection object.
| database_error |
| void nanodbc::transaction::commit | ( | ) |
Commits transaction immediately.
| database_error |