#include <sqt/foundation/transaction.h>
Represents an ongoing transaction on a database, providing methods to commit or roll back the transaction.
To begin a transaction, use the sqt::Database::BeginTransaction() method, which returns a sqt::Transaction instance. To commit the transaction, call the Commit() method explicitly. To roll back the transaction, either call the Rollback() method explicitly or let the sqt::Transaction instance go out of scope, which will automatically roll back the transaction.
Public Member Functions | |
| ~Transaction () | |
| Transaction (const Transaction &)=delete | |
| Transaction & | operator= (const Transaction &)=delete |
| Transaction (Transaction &&other) noexcept | |
| Transaction & | operator= (Transaction &&other) noexcept |
| void | Commit () |
| void | Rollback () |
Friends | |
| class | Database |