crawlserv++  [under development]
Application for crawling and analyzing textual content of websites.
crawlservpp::Main::Database::Transaction Class Reference

Wrapper class for in-scope transactions. More...

#include <Database.hpp>

Construction and Destruction

 Transaction (Main::Database &db, const std::string &isolationLevel)
 Constructor starting the transaction using the specified isolation level. More...
 
 Transaction (Main::Database &db)
 Constructor starting the transaction using the default isolation level. More...
 
virtual ~Transaction ()
 Destructor committing the transaction on success. More...
 

Setter

void success ()
 Sets the state of the transaction to successful. More...
 

Copy and Move

The class is neither copyable, nor moveable.

 Transaction (Transaction &)=delete
 Deleted copy constructor. More...
 
Transactionoperator= (Transaction &)=delete
 Deleted copy assignment operator. More...
 
 Transaction (Transaction &&)=delete
 Deleted move constructor. More...
 
Transactionoperator= (Transaction &&)=delete
 Deleted move assignment operator. More...
 

Detailed Description

Wrapper class for in-scope transactions.

Constructor & Destructor Documentation

◆ Transaction() [1/4]

crawlservpp::Main::Database::Transaction::Transaction ( Main::Database db,
const std::string &  isolationLevel 
)
inline

Constructor starting the transaction using the specified isolation level.

Parameters
dbReference to the database connection to be used.
isolationLevelConstant reference to a string containing the isolation level to be used.

◆ Transaction() [2/4]

crawlservpp::Main::Database::Transaction::Transaction ( Main::Database db)
inlineexplicit

Constructor starting the transaction using the default isolation level.

Parameters
dbReference to the database connection to be used.

◆ ~Transaction()

virtual crawlservpp::Main::Database::Transaction::~Transaction ( )
inlinevirtual

Destructor committing the transaction on success.

◆ Transaction() [3/4]

crawlservpp::Main::Database::Transaction::Transaction ( Transaction )
delete

Deleted copy constructor.

◆ Transaction() [4/4]

crawlservpp::Main::Database::Transaction::Transaction ( Transaction &&  )
delete

Deleted move constructor.

Member Function Documentation

◆ operator=() [1/2]

Transaction& crawlservpp::Main::Database::Transaction::operator= ( Transaction )
delete

Deleted copy assignment operator.

◆ operator=() [2/2]

Transaction& crawlservpp::Main::Database::Transaction::operator= ( Transaction &&  )
delete

Deleted move assignment operator.

◆ success()

void crawlservpp::Main::Database::Transaction::success ( )
inline

Sets the state of the transaction to successful.

The transaction will be committed on destruction.

Referenced by crawlservpp::Main::Database::moveWebsite().


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