EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairDbConnection Class Reference

#include <EicRoot/blob/master/dbase/dbInterface/FairDbConnection.h>

+ Collaboration diagram for FairDbConnection:

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 FairDbExceptionLogGetExceptionLog () 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
 

Detailed Description

Definition at line 21 of file FairDbConnection.h.

View newest version in sPHENIX GitHub at line 21 of file FairDbConnection.h

Constructor & Destructor Documentation

FairDbConnection::FairDbConnection ( const string &  url = "",
const string &  user = "",
const string &  password = "" 
)
FairDbConnection::~FairDbConnection ( )
virtual

Definition at line 90 of file FairDbConnection.cxx.

View newest version in sPHENIX GitHub at line 90 of file FairDbConnection.cxx

References Close().

+ Here is the call graph for this function:

FairDbConnection::FairDbConnection ( const FairDbConnection )
protected

Member Function Documentation

void FairDbConnection::ClearExceptionLog ( )
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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void FairDbConnection::CloseIdleConnection ( )
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.

+ Here is the call graph for this function:

void FairDbConnection::Connect ( )
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().

+ Here is the caller graph for this function:

void FairDbConnection::ConnectStatement ( )
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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void FairDbConnection::DisConnect ( )
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().

+ Here is the caller graph for this function:

void FairDbConnection::DisConnectStatement ( )
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().

+ Here is the caller graph for this function:

const string& FairDbConnection::GetDbName ( ) const
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().

+ Here is the caller graph for this function:

FairDb::DbTypes FairDbConnection::GetDbType ( ) const
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().

+ Here is the caller graph for this function:

const FairDbExceptionLog& FairDbConnection::GetExceptionLog ( ) const
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().

+ Here is the caller graph for this function:

const string& FairDbConnection::GetPassword ( ) const
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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

const string& FairDbConnection::GetUser ( ) const
inline

Definition at line 35 of file FairDbConnection.h.

View newest version in sPHENIX GitHub at line 35 of file FairDbConnection.h

Bool_t FairDbConnection::IsClosed ( ) const
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().

+ Here is the caller graph for this function:

Bool_t FairDbConnection::IsTemporary ( ) const
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().

+ Here is the caller graph for this function:

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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

FairDbConnection FairDbConnection::operator= ( const FairDbConnection )
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().

+ Here is the call graph for this function:

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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void FairDbConnection::SetPermanent ( Bool_t  permanent = kTRUE)
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().

+ Here is the caller graph for this function:

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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

Member Data Documentation

string FairDbConnection::fDbName
protected

Definition at line 63 of file FairDbConnection.h.

View newest version in sPHENIX GitHub at line 63 of file FairDbConnection.h

FairDb::DbTypes FairDbConnection::fDbType
protected

Definition at line 71 of file FairDbConnection.h.

View newest version in sPHENIX GitHub at line 71 of file FairDbConnection.h

FairDbExceptionLog FairDbConnection::fExceptionLog
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().

string FairDbConnection::fExistingTableList
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().

Bool_t FairDbConnection::fIsTemporary
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().

Int_t FairDbConnection::fNumConnectedStatements
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().

string FairDbConnection::fPassword
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().

TSQLServer* FairDbConnection::fServer
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().

TUrl FairDbConnection::fUrl
protected

Definition at line 68 of file FairDbConnection.h.

View newest version in sPHENIX GitHub at line 68 of file FairDbConnection.h

Referenced by GetUrl(), and Open().

Bool_t FairDbConnection::fUrlValidated
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().

string FairDbConnection::fUser
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().


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