SQT
A C++ ORM framework for SQLite
Loading...
Searching...
No Matches
sqt::Transaction Class Reference

#include <sqt/foundation/transaction.h>

Description

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.

See also
sqt::Database::BeginTransaction()

Public Member Functions

 ~Transaction ()
 Transaction (const Transaction &)=delete
Transactionoperator= (const Transaction &)=delete
 Transaction (Transaction &&other) noexcept
Transactionoperator= (Transaction &&other) noexcept
void Commit ()
void Rollback ()

Friends

class Database