EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
#include <EicRoot/blob/master/dbase/dbInterface/FairDbConnection.h>
Public Member Functions | |
FairDbConnection (const string &url="", const string &user="", const string &password="") | |
virtual | ~FairDbConnection () |
FairDb::DbTypes | GetDbType () const |
const string & | GetDbName () const |
const string & | GetPassword () const |
const string & | GetUrl () const |
const string & | GetUser () const |
Bool_t | Close (Bool_t force=kFALSE) |
Bool_t | Open () |
TSQLServer * | GetServer () |
TSQLStatement * | CreatePreparedStatement (const string &sql) |
Bool_t | IsTemporary () const |
Bool_t | TableExists (const string &tableName) const |
void | SetTableExists (const string &tableName="") |
void | Connect () |
void | DisConnect () |
void | ConnectStatement () |
void | DisConnectStatement () |
void | SetPermanent (Bool_t permanent=kTRUE) |
Bool_t | IsClosed () const |
const FairDbExceptionLog & | GetExceptionLog () const |
void | ClearExceptionLog () |
Bool_t | PrintExceptionLog (Int_t level=3) const |
Print exceptions at level of above and return true if any. | |
void | RecordException () |
Protected Member Functions | |
void | CloseIdleConnection () |
FairDbConnection (const FairDbConnection &) | |
FairDbConnection | operator= (const FairDbConnection &) |
Protected Attributes | |
string | fDbName |
string | fUser |
string | fPassword |
string | fExistingTableList |
Int_t | fNumConnectedStatements |
TUrl | fUrl |
Bool_t | fUrlValidated |
Bool_t | fIsTemporary |
FairDb::DbTypes | fDbType |
TSQLServer * | fServer |
FairDbExceptionLog | fExceptionLog |
Definition at line 21 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 21 of file FairDbConnection.h
FairDbConnection::FairDbConnection | ( | const string & | url = "" , |
const string & | user = "" , |
||
const string & | password = "" |
||
) |
|
virtual |
Definition at line 90 of file FairDbConnection.cxx.
View newest version in sPHENIX GitHub at line 90 of file FairDbConnection.cxx
References Close().
|
protected |
|
inline |
Definition at line 58 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 58 of file FairDbConnection.h
Bool_t FairDbConnection::Close | ( | Bool_t | force = kFALSE | ) |
Definition at line 145 of file FairDbConnection.cxx.
View newest version in sPHENIX GitHub at line 145 of file FairDbConnection.cxx
References fNumConnectedStatements, fServer, GetUrl(), and IsClosed().
Referenced by CloseIdleConnection(), and ~FairDbConnection().
|
protected |
Definition at line 171 of file FairDbConnection.cxx.
View newest version in sPHENIX GitHub at line 171 of file FairDbConnection.cxx
References Close(), fIsTemporary, and fNumConnectedStatements.
|
inline |
Definition at line 46 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 46 of file FairDbConnection.h
Referenced by FairDbProxy::StoreMetaData().
|
inline |
Definition at line 48 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 48 of file FairDbConnection.h
TSQLStatement * FairDbConnection::CreatePreparedStatement | ( | const string & | sql | ) |
Definition at line 179 of file FairDbConnection.cxx.
View newest version in sPHENIX GitHub at line 179 of file FairDbConnection.cxx
References fServer, and Open().
Referenced by FairDbStatement::CreateProcessedStatement(), and SetTableExists().
|
inline |
Definition at line 47 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 47 of file FairDbConnection.h
Referenced by FairDbProxy::StoreMetaData().
|
inline |
Definition at line 49 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 49 of file FairDbConnection.h
Referenced by FairDbStatement::~FairDbStatement().
|
inline |
Definition at line 32 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 32 of file FairDbConnection.h
Referenced by FairDbStatement::ExecuteQuery(), and FairDbStatement::ExecuteUpdate().
|
inline |
Definition at line 31 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 31 of file FairDbConnection.h
Referenced by FairDbProxy::ReplaceSeqNo().
|
inline |
Definition at line 57 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 57 of file FairDbConnection.h
Referenced by FairDbStatement::AppendExceptionLog().
|
inline |
Definition at line 33 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 33 of file FairDbConnection.h
TSQLServer * FairDbConnection::GetServer | ( | ) |
Definition at line 194 of file FairDbConnection.cxx.
View newest version in sPHENIX GitHub at line 194 of file FairDbConnection.cxx
References fServer, and Open().
Referenced by FairDbStatement::ExecuteUpdate(), and FairDbProxy::StoreMetaData().
const string & FairDbConnection::GetUrl | ( | ) | const |
Definition at line 200 of file FairDbConnection.cxx.
View newest version in sPHENIX GitHub at line 200 of file FairDbConnection.cxx
References fUrl.
Referenced by Close(), and FairDbMultConnector::CreateTemporaryTable().
|
inline |
Definition at line 35 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 35 of file FairDbConnection.h
|
inline |
Definition at line 56 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 56 of file FairDbConnection.h
Referenced by Close(), and Open().
|
inline |
Definition at line 43 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 43 of file FairDbConnection.h
Referenced by FairDbMultConnector::CreateTemporaryTable().
Bool_t FairDbConnection::Open | ( | ) |
for on attempt
Definition at line 99 of file FairDbConnection.cxx.
View newest version in sPHENIX GitHub at line 99 of file FairDbConnection.cxx
References fPassword, fServer, fUrl, fUrlValidated, fUser, and IsClosed().
Referenced by ClassImp(), CreatePreparedStatement(), and GetServer().
|
protected |
Bool_t FairDbConnection::PrintExceptionLog | ( | Int_t | level = 3 | ) | const |
Print exceptions at level of above and return true if any.
Definition at line 253 of file FairDbConnection.cxx.
View newest version in sPHENIX GitHub at line 253 of file FairDbConnection.cxx
References fExceptionLog, and FairDbExceptionLog::Size().
void FairDbConnection::RecordException | ( | ) |
Definition at line 258 of file FairDbConnection.cxx.
View newest version in sPHENIX GitHub at line 258 of file FairDbConnection.cxx
References FairDbExceptionLog::AddEntry(), fExceptionLog, and fServer.
Referenced by FairDbStatement::ExecuteUpdate().
|
inline |
Definition at line 53 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 53 of file FairDbConnection.h
Referenced by FairDbMultConnector::CreateTemporaryTable().
void FairDbConnection::SetTableExists | ( | const string & | tableName = "" | ) |
Definition at line 208 of file FairDbConnection.cxx.
View newest version in sPHENIX GitHub at line 208 of file FairDbConnection.cxx
References CreatePreparedStatement(), fExistingTableList, and TableExists().
Referenced by FairDbMultConnector::CreateTemporaryTable().
Bool_t FairDbConnection::TableExists | ( | const string & | tableName | ) | const |
Definition at line 239 of file FairDbConnection.cxx.
View newest version in sPHENIX GitHub at line 239 of file FairDbConnection.cxx
References fExistingTableList.
Referenced by FairDbMultConnector::GetTableDbNo(), and SetTableExists().
|
protected |
Definition at line 63 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 63 of file FairDbConnection.h
|
protected |
Definition at line 71 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 71 of file FairDbConnection.h
|
protected |
Definition at line 73 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 73 of file FairDbConnection.h
Referenced by PrintExceptionLog(), and RecordException().
|
protected |
Definition at line 66 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 66 of file FairDbConnection.h
Referenced by SetTableExists(), and TableExists().
|
protected |
Definition at line 70 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 70 of file FairDbConnection.h
Referenced by CloseIdleConnection().
|
protected |
Definition at line 67 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 67 of file FairDbConnection.h
Referenced by Close(), and CloseIdleConnection().
|
protected |
Definition at line 65 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 65 of file FairDbConnection.h
Referenced by Open().
|
protected |
Definition at line 72 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 72 of file FairDbConnection.h
Referenced by Close(), CreatePreparedStatement(), GetServer(), Open(), and RecordException().
|
protected |
Definition at line 68 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 68 of file FairDbConnection.h
|
protected |
Definition at line 69 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 69 of file FairDbConnection.h
Referenced by Open().
|
protected |
Definition at line 64 of file FairDbConnection.h.
View newest version in sPHENIX GitHub at line 64 of file FairDbConnection.h
Referenced by Open().