00001
00002
00003
00004 #ifndef DBI_H
00005 #define DBI_H
00006
00027 #include <map>
00028 #include <string>
00029 #include "Context/Context.h"
00030 #include "Context/TimeStamp.h"
00031
00032 #include "Rtypes.h"
00033
00034 class TList;
00035
00036 namespace Dbi
00037
00038 {
00039
00040
00041
00042 typedef Int_t Task;
00043
00044 enum TaskTypes{ kAnyTask = -1,
00045 kDefaultTask = 0
00046 };
00047
00048
00049 typedef Int_t SubSite;
00050
00051 enum SubSiteTypes{ kAnySubSite = -1,
00052 kDefaultSubSite = 0
00053 };
00054
00055
00056
00057 enum TypeRegimes{ kRootRegime = 0,
00058 kSQLRegime = 1
00059 };
00060
00061 enum DataTypes{ kUnknown,
00062 kBool,
00063 kChar,
00064 kUChar,
00065 kTiny,
00066 kUTiny,
00067 kShort,
00068 kUShort,
00069 kInt,
00070 kUInt,
00071 kLong,
00072 kULong,
00073 kFloat,
00074 kDouble,
00075 kString,
00076 kTString,
00077 kDate
00078 };
00079
00080
00081 enum DbTypes{ kUnknownDbType = -1,
00082 kMySQL = 0,
00083 kOracle = 1
00084 };
00085
00086 enum AbortTest{ kDisabled,
00087 kTableMissing,
00088 kDataMissing
00089 };
00090
00091 enum { kMAXLOCALSEQNO = 99999999,
00092 kMAXTABLENAMELEN = 80};
00093
00094 std::string GetVldDescr(const char* tableName,
00095 Bool_t isTemporary = false);
00096
00097
00099 Int_t GetTimeGate(const std::string& tableName);
00100 void SetTimeGate(const std::string& tableName, Int_t timeGate);
00101
00102
00103
00104 std::string MakeDateTimeString(const TimeStamp& timeStamp);
00105 TimeStamp MakeTimeStamp(const std::string& sqlDateTime,
00106 Bool_t* ok =0);
00107
00108
00109
00110 Bool_t NotGlobalSeqNo(UInt_t seqNo);
00111
00112
00113 }
00114
00115 #endif // DBI_H