00001
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
00038
00039 typedef Int_t Task;
00040
00041 enum TaskTypes{ kAnyTask = -1,
00042 kDefaultTask = 0
00043 };
00044
00045 enum TypeRegimes{ kRootRegime = 0,
00046 kSQLRegime = 1
00047 };
00048
00049 enum DataTypes{ kUnknown,
00050 kBool,
00051 kChar,
00052 kUChar,
00053 kTiny,
00054 kUTiny,
00055 kShort,
00056 kUShort,
00057 kInt,
00058 kUInt,
00059 kLong,
00060 kULong,
00061 kFloat,
00062 kDouble,
00063 kString,
00064 kTString,
00065 kDate
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,
00080 kMAXTABLENAMELEN = 80};
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
00093 std::string MakeDateTimeString(const VldTimeStamp& timeStamp);
00094 VldTimeStamp MakeTimeStamp(const std::string& sqlDateTime,
00095 Bool_t* ok =0);
00096
00097
00098
00099 Bool_t NotGlobalSeqNo(UInt_t seqNo);
00100
00101
00102 }
00103
00104
00105 #endif // DBI_H