/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
DbiCascader Class Reference

#include <DbiCascader.h>

Collaboration diagram for DbiCascader:
Collaboration graph
[legend]

List of all members.

Classes

class  Lock

Public Types

enum  Status { kFailed, kClosed, kOpen }

Public Member Functions

DbiStatementCreateStatement (UInt_t dbNo) const
 Create a DbiStatement. Caller must delete.
const DbiConnectionGetConnection (UInt_t dbNo) const
 Return associated DbiConnection. DbiCascader retains ownership.
DbiConnectionGetConnection (UInt_t dbNo)
string GetDbName (UInt_t dbNo) const
Int_t GetDbNo (const string &dbName) const
Int_t GetStatus (UInt_t dbNo) const
string GetStatusAsString (UInt_t dbNo) const
string GetURL (UInt_t dbNo) const
Bool_t IsTemporaryTable (const string &tableName, Int_t dbNo) const
Int_t AllocateSeqNo (const string &tableName, Int_t requireGlobal=0, Int_t dbNo=0) const
Int_t GetAuthorisingDbNo () const
UInt_t GetNumDb () const
Int_t GetTableDbNo (const string &tableName, Int_t selectDbNo=-1) const
Bool_t TableExists (const string &tableName, Int_t selectDbNo=-1) const
Int_t CreateTemporaryTable (const string &tableName, const string &tableDescr)
void HoldConnections ()
void ReleaseConnections ()
void SetPermanent (UInt_t dbNo)
void SetAuthorisingEntry (Int_t entry)

Private Member Functions

Int_t ReserveNextSeqNo (const string &tableName, Bool_t isGlobal, UInt_t dbNo) const
 DbiCascader ()
virtual ~DbiCascader ()
 DbiCascader (const DbiCascader &)

Private Attributes

Int_t fGlobalSeqNoDbNo
 1st db in cascade with GlobalSeqNo table
vector< DbiConnection * > fConnections
 Vector of DbiConnections, one for each DB.
std::map< string, Int_t > fTemporaryTables
 Mapping Name->DbNo for temporary tables.

Friends

class DbiTableProxyRegistry
ostream & operator<< (ostream &s, const DbiCascader &cascader)

Detailed Description

Id:
DbiCascader.h,v 1.27 2007/04/26 14:19:57 west Exp

Definition at line 51 of file DbiCascader.h.


Member Enumeration Documentation

Enumerator:
kFailed 
kClosed 
kOpen 

Definition at line 59 of file DbiCascader.h.


Constructor & Destructor Documentation

DbiCascader::DbiCascader ( ) [private]
virtual DbiCascader::~DbiCascader ( ) [private, virtual]
DbiCascader::DbiCascader ( const DbiCascader ) [private]

Member Function Documentation

DbiStatement* DbiCascader::CreateStatement ( UInt_t  dbNo) const

Create a DbiStatement. Caller must delete.

const DbiConnection* DbiCascader::GetConnection ( UInt_t  dbNo) const

Return associated DbiConnection. DbiCascader retains ownership.

DbiConnection* DbiCascader::GetConnection ( UInt_t  dbNo)
string DbiCascader::GetDbName ( UInt_t  dbNo) const
Int_t DbiCascader::GetDbNo ( const string &  dbName) const
Int_t DbiCascader::GetStatus ( UInt_t  dbNo) const [inline]

Definition at line 76 of file DbiCascader.h.

                                            {
                 if ( dbNo >= GetNumDb() || ! fConnections[dbNo]  ) return kFailed;
                 return fConnections[dbNo]->IsClosed() ? kClosed : kOpen; } 
string DbiCascader::GetStatusAsString ( UInt_t  dbNo) const
string DbiCascader::GetURL ( UInt_t  dbNo) const [inline]

Definition at line 80 of file DbiCascader.h.

                                         {
                      return ( dbNo < GetNumDb() ) ? fConnections[dbNo]-> GetUrl(): ""; }
Bool_t DbiCascader::IsTemporaryTable ( const string &  tableName,
Int_t  dbNo 
) const
Int_t DbiCascader::AllocateSeqNo ( const string &  tableName,
Int_t  requireGlobal = 0,
Int_t  dbNo = 0 
) const
Int_t DbiCascader::GetAuthorisingDbNo ( ) const [inline]

Definition at line 89 of file DbiCascader.h.

{ return fGlobalSeqNoDbNo; }
UInt_t DbiCascader::GetNumDb ( ) const [inline]

Definition at line 90 of file DbiCascader.h.

{return fConnections.size();}
Int_t DbiCascader::GetTableDbNo ( const string &  tableName,
Int_t  selectDbNo = -1 
) const
Bool_t DbiCascader::TableExists ( const string &  tableName,
Int_t  selectDbNo = -1 
) const [inline]

Definition at line 92 of file DbiCascader.h.

                                                                                 { 
                            return this->GetTableDbNo(tableName,selectDbNo) >= 0; }
Int_t DbiCascader::CreateTemporaryTable ( const string &  tableName,
const string &  tableDescr 
)
void DbiCascader::HoldConnections ( )
void DbiCascader::ReleaseConnections ( )
void DbiCascader::SetPermanent ( UInt_t  dbNo)
void DbiCascader::SetAuthorisingEntry ( Int_t  entry) [inline]

Definition at line 104 of file DbiCascader.h.

{fGlobalSeqNoDbNo = entry;}
Int_t DbiCascader::ReserveNextSeqNo ( const string &  tableName,
Bool_t  isGlobal,
UInt_t  dbNo 
) const [private]

Friends And Related Function Documentation

friend class DbiTableProxyRegistry [friend]

Definition at line 54 of file DbiCascader.h.

ostream& operator<< ( ostream &  s,
const DbiCascader cascader 
) [friend]

Member Data Documentation

1st db in cascade with GlobalSeqNo table

Definition at line 122 of file DbiCascader.h.

Vector of DbiConnections, one for each DB.

Definition at line 125 of file DbiCascader.h.

std::map<string,Int_t> DbiCascader::fTemporaryTables [private]

Mapping Name->DbNo for temporary tables.

Definition at line 128 of file DbiCascader.h.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:56:45 for DatabaseInterface by doxygen 1.7.4