Content


NTL
Core
CDbTransaction

CDbTransaction


This helper class provides high level abstraction and greater simplified work with transactions.

You can find more information in comments below.

class CDbTransaction final
{
public:
    CDbTransaction(IDbConnection* connection, IDbStatement *statement, IDbQueryBuilder* qb, const String& options = L""); // Constructor. "connection" is ignored if "statement" is specified. Either "connection" or "statement" is required. "qb" is required 
    ~CDbTransaction(); // Destructor. Automatically rolls back transaction if it was not committed 

    void Commit(); // Commit transaction 
    void RollBack(); // Roll back transaction 
};
Namespace: nitisa
Include: Nitisa/Db/DbTransaction.h