#include <DbiSqlValPacket.h>
Collaboration diagram for DbiSqlValPacket:
Public Types | |
typedef enum DbiSqlValPacket::ECompResult | CompResult_t |
kIdentical | |
kUpdate | |
kOutOfDate | |
kConflict | |
enum | ECompResult { kIdentical, kUpdate, kOutOfDate, kConflict } |
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 |
Definition at line 45 of file DbiSqlValPacket.h.
Definition at line 52 of file DbiSqlValPacket.h.
00052 { 00053 kIdentical, 00054 kUpdate, 00055 kOutOfDate, 00056 kConflict 00057 } CompResult_t;
DbiSqlValPacket::DbiSqlValPacket | ( | ) |
DbiSqlValPacket::DbiSqlValPacket | ( | std::ifstream & | is | ) |
DbiSqlValPacket::DbiSqlValPacket | ( | const DbiValidityRec & | vrec | ) |
virtual DbiSqlValPacket::~DbiSqlValPacket | ( | ) | [virtual] |
DbiSqlValPacket::DbiSqlValPacket | ( | const DbiSqlValPacket & | ) | [private] |
Bool_t DbiSqlValPacket::CanBeStored | ( | ) | const [inline] |
Definition at line 66 of file DbiSqlValPacket.h.
00066 { 00067 return (fSeqNo > 0 && fNumErrors == 0 && this->GetNumSqlStmts()> 0) 00068 ? 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] |
UInt_t DbiSqlValPacket::GetNumSqlStmts | ( | ) | const [inline] |
UInt_t DbiSqlValPacket::GetSeqNo | ( | ) | const [inline] |
TimeStamp DbiSqlValPacket::GetVersionDate | ( | ) | const [inline] |
string DbiSqlValPacket::GetStmt | ( | UInt_t | stmtNo | ) | const |
std::vector<string> DbiSqlValPacket::GetStmtValues | ( | UInt_t | stmtNo | ) | const |
const string& DbiSqlValPacket::GetTableName | ( | ) | const [inline] |
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] |
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] |
Bool_t DbiSqlValPacket::fgLastMetaHadRowCounter [static, private] |
Definition at line 124 of file DbiSqlValPacket.h.
UInt_t DbiSqlValPacket::fNumErrors [private] |
UInt_t DbiSqlValPacket::fSeqNo [private] |
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] |
std::list<string> DbiSqlValPacket::fSqlStmts [private] |
UInt_t DbiSqlValPacket::fNumStmts [private] |
string DbiSqlValPacket::fTableName [private] |
TimeStamp DbiSqlValPacket::fVersionDate [private] |