#include <DbScopedTransaction.h>
Public Member Functions | |
int | commit () |
commit transaction. Will disconnect from database if connection timeout==0 or connectted time close to the threshold More... | |
DbScopedTransaction (cond::DbSession &session) | |
int | isActive () const |
current transaction is active More... | |
bool | isLocallyActive () const |
query if locally has been activated More... | |
bool | isReadOnly () const |
current transaction is readonly More... | |
bool | rollback () |
rollback transaction More... | |
int | start (bool readOnly=false) |
start transaction More... | |
~DbScopedTransaction () | |
Private Attributes | |
bool | m_locallyActive |
cond::DbSession & | m_session |
Definition at line 17 of file DbScopedTransaction.h.
|
explicit |
Definition at line 6 of file DbScopedTransaction.cc.
DbScopedTransaction::~DbScopedTransaction | ( | ) |
Definition at line 10 of file DbScopedTransaction.cc.
int DbScopedTransaction::commit | ( | ) |
commit transaction. Will disconnect from database if connection timeout==0 or connectted time close to the threshold
Definition at line 23 of file DbScopedTransaction.cc.
References run_regression::ret.
Referenced by cond::Logger::createLogDBIfNonExist(), TestFunct::CreateMetaTable(), TestFunct::DropItem(), cond::ExportIOVUtilities::execute(), cond::AlignSplitIOV::execute(), HcalO2OManager::getListOfPoolIovs(), HcalO2OManager::getListOfPoolTags(), TestFunct::GetMetadata(), cond::Logger::logFailedOperationNow(), cond::Logger::logOperationNow(), L1ConfigOnlineProdBase< TRcd, TData >::produce(), TestFunct::Read(), TestFunct::ReadAll(), TestFunct::ReadWithIOV(), TestFunct::Write(), and TestFunct::WriteWithIOV().
int DbScopedTransaction::isActive | ( | ) | const |
current transaction is active
Definition at line 41 of file DbScopedTransaction.cc.
bool DbScopedTransaction::isLocallyActive | ( | ) | const |
bool DbScopedTransaction::isReadOnly | ( | ) | const |
current transaction is readonly
Definition at line 45 of file DbScopedTransaction.cc.
bool DbScopedTransaction::rollback | ( | ) |
rollback transaction
Definition at line 30 of file DbScopedTransaction.cc.
References run_regression::ret.
int DbScopedTransaction::start | ( | bool | readOnly = false | ) |
start transaction
Definition at line 16 of file DbScopedTransaction.cc.
References run_regression::ret.
Referenced by progressbar.ProgressBar::__next__(), Types.LuminosityBlockRange::cppID(), Types.EventRange::cppID(), cond::Logger::createLogDBIfNonExist(), TestFunct::CreateMetaTable(), TestFunct::DropItem(), cond::ExportIOVUtilities::execute(), cond::AlignSplitIOV::execute(), HcalO2OManager::getListOfPoolIovs(), HcalO2OManager::getListOfPoolTags(), TestFunct::GetMetadata(), cond::Logger::logFailedOperationNow(), cond::Logger::logOperationNow(), L1ConfigOnlineProdBase< TRcd, TData >::produce(), TestFunct::Read(), TestFunct::ReadAll(), TestFunct::ReadWithIOV(), TestFunct::Write(), and TestFunct::WriteWithIOV().
|
private |
Definition at line 36 of file DbScopedTransaction.h.
|
private |
Definition at line 35 of file DbScopedTransaction.h.