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

In This Package:

Public Types | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
DbiSqlValPacket Class Reference

#include <DbiSqlValPacket.h>

Collaboration diagram for DbiSqlValPacket:
Collaboration graph
[legend]

List of all members.

Public Types

enum  ECompResult { kIdentical, kUpdate, kOutOfDate, kConflict }
typedef enum
DbiSqlValPacket::ECompResult 
CompResult_t

Public Member Functions

 DbiSqlValPacket ()
 DbiSqlValPacket (std::ifstream &is)
 DbiSqlValPacket (const DbiValidityRec &vrec)
virtual ~DbiSqlValPacket ()
Bool_t CanBeStored () const
CompResult_t Compare (const DbiSqlValPacket &that, Bool_t log=kFALSE, const Char_t *thisName="this", const Char_t *thatName="that") const
Bool_t CreateTable (UInt_t dbNo) const
UInt_t GetNumErrors () const
UInt_t GetNumSqlStmts () const
UInt_t GetSeqNo () const
TimeStamp GetVersionDate () const
string GetStmt (UInt_t stmtNo) const
std::vector< string > GetStmtValues (UInt_t stmtNo) const
const string & GetTableName () const
Bool_t IsEqual (const DbiSqlValPacket &that, Bool_t log=kFALSE, const Char_t *thisName="this", const Char_t *thatName="that") const
Bool_t Fill (std::ifstream &is)
Bool_t Store (UInt_t dbNo, Bool_t replace=kFALSE) const
Bool_t Write (std::ofstream &ios, Bool_t addMetadata=kFALSE) const
void Recreate (const string &tableName, const ContextRange &vr, Int_t aggNo, Dbi::SubSite subsite=0, Dbi::Task task=0, TimeStamp versionDate=TimeStamp())
Bool_t AddDataRow (const DbiTableProxy &tblProxy, const DbiValidityRec *vrec, const DbiTableRow &row)
void Clear ()
void SetVersionDate (TimeStamp ts)
void SetSeqNo (UInt_t seqno)
void Reset ()
virtual void Print (Option_t *option="") const

Private Member Functions

void AddRow (const string &row)
Bool_t AddRow (const DbiTableProxy &tblProxy, const DbiValidityRec *vrec, const DbiTableRow &row)
void Report (const char *msg, UInt_t line_num, const string &line)
void SetMetaData () const
void SetSeqNoOnRow (string &row, const string &seqno)
 DbiSqlValPacket (const DbiSqlValPacket &)

Private Attributes

UInt_t fNumErrors
 Number of error encountered while filling.
UInt_t fSeqNo
 Sequence number or 0 if not filled.
string fSqlMySqlMetaMain
 MySQL SQL to create main table. May be empty until needed.
string fSqlMySqlMetaVld
 As fSqlMySqlMetaMain but for aux. table.
std::list< string > fSqlStmts
 Set of SQL statements to generate packet.
UInt_t fNumStmts
 Number of statements.
string fTableName
 Table name or null if not filled.
TimeStamp fVersionDate
 Version date, or object version date if unfilled.

Static Private Attributes

static Bool_t fgLastMetaHadRowCounter

Detailed Description

Id:
DbiSqlValPacket.h,v 1.20 2006/08/08 10:51:32 west Exp

Definition at line 45 of file DbiSqlValPacket.h.


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
kIdentical 
kUpdate 
kOutOfDate 
kConflict 

Definition at line 52 of file DbiSqlValPacket.h.


Constructor & Destructor Documentation

DbiSqlValPacket::DbiSqlValPacket ( )
DbiSqlValPacket::DbiSqlValPacket ( std::ifstream &  is)
DbiSqlValPacket::DbiSqlValPacket ( const DbiValidityRec vrec)
virtual DbiSqlValPacket::~DbiSqlValPacket ( ) [virtual]
DbiSqlValPacket::DbiSqlValPacket ( const DbiSqlValPacket ) [private]

Member Function Documentation

Bool_t DbiSqlValPacket::CanBeStored ( ) const [inline]

Definition at line 66 of file DbiSqlValPacket.h.

                                   { 
             return (fSeqNo > 0 && fNumErrors == 0 && this->GetNumSqlStmts()> 0)
            ? kTRUE : kFALSE; };
CompResult_t DbiSqlValPacket::Compare ( const DbiSqlValPacket that,
Bool_t  log = kFALSE,
const Char_t *  thisName = "this",
const Char_t *  thatName = "that" 
) const
Bool_t DbiSqlValPacket::CreateTable ( UInt_t  dbNo) const
UInt_t DbiSqlValPacket::GetNumErrors ( ) const [inline]

Definition at line 74 of file DbiSqlValPacket.h.

{ return fNumErrors; }
UInt_t DbiSqlValPacket::GetNumSqlStmts ( ) const [inline]

Definition at line 75 of file DbiSqlValPacket.h.

{ return fNumStmts; }
UInt_t DbiSqlValPacket::GetSeqNo ( ) const [inline]

Definition at line 76 of file DbiSqlValPacket.h.

{ return fSeqNo; }
TimeStamp DbiSqlValPacket::GetVersionDate ( ) const [inline]

Definition at line 77 of file DbiSqlValPacket.h.

{ return fVersionDate; }
string DbiSqlValPacket::GetStmt ( UInt_t  stmtNo) const
std::vector<string> DbiSqlValPacket::GetStmtValues ( UInt_t  stmtNo) const
const string& DbiSqlValPacket::GetTableName ( ) const [inline]

Definition at line 80 of file DbiSqlValPacket.h.

{ return fTableName; }
Bool_t DbiSqlValPacket::IsEqual ( const DbiSqlValPacket that,
Bool_t  log = kFALSE,
const Char_t *  thisName = "this",
const Char_t *  thatName = "that" 
) const
Bool_t DbiSqlValPacket::Fill ( std::ifstream &  is)
Bool_t DbiSqlValPacket::Store ( UInt_t  dbNo,
Bool_t  replace = kFALSE 
) const
Bool_t DbiSqlValPacket::Write ( std::ofstream &  ios,
Bool_t  addMetadata = kFALSE 
) const
void DbiSqlValPacket::Recreate ( const string &  tableName,
const ContextRange vr,
Int_t  aggNo,
Dbi::SubSite  subsite = 0,
Dbi::Task  task = 0,
TimeStamp  versionDate = TimeStamp() 
)
Bool_t DbiSqlValPacket::AddDataRow ( const DbiTableProxy tblProxy,
const DbiValidityRec vrec,
const DbiTableRow row 
)
void DbiSqlValPacket::Clear ( ) [inline]

Definition at line 104 of file DbiSqlValPacket.h.

{ this->Reset(); fNumErrors = 0; }
void DbiSqlValPacket::SetVersionDate ( TimeStamp  ts)
void DbiSqlValPacket::SetSeqNo ( UInt_t  seqno)
void DbiSqlValPacket::Reset ( )
virtual void DbiSqlValPacket::Print ( Option_t *  option = "") const [virtual]
void DbiSqlValPacket::AddRow ( const string &  row) [private]
Bool_t DbiSqlValPacket::AddRow ( const DbiTableProxy tblProxy,
const DbiValidityRec vrec,
const DbiTableRow row 
) [private]
void DbiSqlValPacket::Report ( const char *  msg,
UInt_t  line_num,
const string &  line 
) [private]
void DbiSqlValPacket::SetMetaData ( ) const [private]
void DbiSqlValPacket::SetSeqNoOnRow ( string &  row,
const string &  seqno 
) [private]

Member Data Documentation

Bool_t DbiSqlValPacket::fgLastMetaHadRowCounter [static, private]

Definition at line 124 of file DbiSqlValPacket.h.

UInt_t DbiSqlValPacket::fNumErrors [private]

Number of error encountered while filling.

Definition at line 131 of file DbiSqlValPacket.h.

UInt_t DbiSqlValPacket::fSeqNo [private]

Sequence number or 0 if not filled.

Definition at line 134 of file DbiSqlValPacket.h.

string DbiSqlValPacket::fSqlMySqlMetaMain [mutable, private]

MySQL SQL to create main table. May be empty until needed.

Definition at line 137 of file DbiSqlValPacket.h.

string DbiSqlValPacket::fSqlMySqlMetaVld [mutable, private]

As fSqlMySqlMetaMain but for aux. table.

Definition at line 140 of file DbiSqlValPacket.h.

std::list<string> DbiSqlValPacket::fSqlStmts [private]

Set of SQL statements to generate packet.

Definition at line 143 of file DbiSqlValPacket.h.

UInt_t DbiSqlValPacket::fNumStmts [private]

Number of statements.

Definition at line 146 of file DbiSqlValPacket.h.

string DbiSqlValPacket::fTableName [private]

Table name or null if not filled.

Definition at line 149 of file DbiSqlValPacket.h.

Version date, or object version date if unfilled.

Definition at line 152 of file DbiSqlValPacket.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