Darwin Neuroevolution Framework
Public Member Functions | List of all members
db::TransactionScope Class Reference

A scope-based transaction guard. More...

#include <database.h>

Public Member Functions

 TransactionScope (Connection &databaseTransaction, TransactionOption option=TransactionOption::Deferred)
 Creates a transaction guard.
 
 ~TransactionScope ()
 Unless the transaction was explicitly committed, it will rollback. More...
 
void commit ()
 Explicitly commit the transaction.
 
void rollback ()
 Explicitly rolls back the transaction.
 

Detailed Description

A scope-based transaction guard.

Constructor & Destructor Documentation

◆ ~TransactionScope()

db::TransactionScope::~TransactionScope ( )

Unless the transaction was explicitly committed, it will rollback.

See also
commit()

The documentation for this class was generated from the following files: