Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Dbi.h

Go to the documentation of this file.
00001 // $Id: Dbi.h,v 1.39 2007/04/26 14:19:57 west Exp $
00002 
00003 #ifndef DBI_H
00004 #define DBI_H
00005 
00026 #include <map>
00027 #include <string>
00028 #include "Validity/VldContext.h"
00029 #include "Validity/VldTimeStamp.h"
00030 
00031 class TList;
00032 
00033 namespace Dbi
00034 
00035 {
00036 
00037 // Types and enum
00038 
00039 typedef  Int_t Task;
00040 
00041  enum TaskTypes{  kAnyTask     = -1,   // Use to disable task selection in context queries.
00042                   kDefaultTask = 0
00043  };
00044 
00045  enum TypeRegimes{ kRootRegime = 0,
00046                    kSQLRegime  = 1 
00047 };
00048 
00049  enum DataTypes{ kUnknown,
00050                  kBool,      // concept
00051                  kChar,      // concept
00052                  kUChar,     // concept
00053                  kTiny,
00054                  kUTiny,
00055                  kShort,
00056                  kUShort,
00057                  kInt,       // concept
00058                  kUInt,      // concept
00059                  kLong,
00060                  kULong,
00061                  kFloat,     // concept
00062                  kDouble,
00063                  kString,    // concept
00064                  kTString,
00065                  kDate       // concept
00066  };
00067 
00068 
00069  enum DbTypes{  kUnknownDbType = -1,
00070                 kMySQL         = 0,
00071                 kOracle        = 1
00072  };
00073 
00074  enum AbortTest{ kDisabled,
00075                  kTableMissing,
00076                  kDataMissing
00077  }; 
00078 
00079   enum { kMAXLOCALSEQNO   = 99999999,    // Max local SeqNo.
00080          kMAXTABLENAMELEN = 80};         // Max length of table name.
00081 
00082      std::string GetVldDescr(const char* tableName,
00083                                    Bool_t isTemporary = false);  
00084             void SetLogLevel(int level);
00085 
00086 
00088         Int_t GetTimeGate(const std::string& tableName);
00089          void SetTimeGate(const std::string& tableName, Int_t timeGate);
00090 
00091          
00092 // DateTime conversion utilities.  
00093   std::string MakeDateTimeString(const VldTimeStamp& timeStamp);
00094  VldTimeStamp MakeTimeStamp(const std::string& sqlDateTime,
00095                                   Bool_t* ok =0);
00096 
00097 
00098 // SeqNo utilities
00099    Bool_t NotGlobalSeqNo(UInt_t seqNo); 
00100 
00101 
00102 }
00103 
00104 
00105 #endif  // DBI_H

Generated on Mon Feb 15 11:06:34 2010 for loon by  doxygen 1.3.9.1