|
lintel 0.2.0
|
#include <Transaction.h>
Public Member Functions | |
| Transaction (const Connection &tempConnection) | |
| Transaction (Transaction &transaction)=delete | |
| void | start () |
| void | commit () |
| void | save (const std::string &savepoint) const |
| void | rollback () |
| void | rollbackTo (const std::string &savepoint) const |
| ~Transaction () | |
Manages a PostgreSQL database transaction with commit, rollback, and savepoint support.
|
explicit |
Constructs a Transaction bound to the given connection.
| tempConnection | the PostgreSQL connection |
|
delete |
| lintel::postgresql::Transaction::~Transaction | ( | ) |
Destructor, rolls back if not finished.
| void lintel::postgresql::Transaction::commit | ( | ) |
Commits the transaction with a COMMIT statement.
| void lintel::postgresql::Transaction::rollback | ( | ) |
Rolls back the transaction with a ROLLBACK statement.
Rolls back to a named savepoint.
| savepoint | the savepoint name |
Creates a savepoint within the transaction.
| savepoint | the savepoint name |
| void lintel::postgresql::Transaction::start | ( | ) |
Begins the transaction with a BEGIN statement.