TDbi.hxx
Go to the documentation of this file.00001
00002
00003 #ifndef XYZDBI_H
00004 #define XYZDBI_H
00005
00006
00007
00008
00009 #include <map>
00010 #include <string>
00011 #include "TVldContext.hxx"
00012 #include "TVldTimeStamp.hxx"
00013
00014
00015 #include "EoaCore.hxx"
00016 OA_EXCEPTION(EOfflineDatabase,EoaCore);
00017 OA_EXCEPTION(ENoEnvironment,EOfflineDatabase);
00018 OA_EXCEPTION(EBadDatabase,EOfflineDatabase);
00019 OA_EXCEPTION(EQueryFailed,EOfflineDatabase);
00020 OA_EXCEPTION(EBadConnection,EOfflineDatabase);
00021 OA_EXCEPTION(EBadTDbiRegistryKeys,EOfflineDatabase);
00022
00023
00024 class TList;
00025 namespace TDbi
00026
00027 {
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 typedef Int_t Task;
00041
00042 enum TaskTypes{ kAnyTask = -1,
00043 kDefaultTask = 0
00044 };
00045
00046 enum TypeRegimes{ kRootRegime = 0,
00047 kSQLRegime = 1
00048 };
00049
00050 enum DataTypes{ kUnknown,
00051 kBool,
00052 kChar,
00053 kUChar,
00054 kTiny,
00055 kUTiny,
00056 kShort,
00057 kUShort,
00058 kInt,
00059 kUInt,
00060 kLong,
00061 kULong,
00062 kFloat,
00063 kDouble,
00064 kString,
00065 kTString,
00066 kDate
00067 };
00068
00069
00070 enum DbTypes{ kMySQL = 0
00071 };
00072
00073 enum AbortTest{ kDisabled,
00074 kTableMissing,
00075 kDataMissing
00076 };
00077
00078 enum { kMAXLOCALSEQNO = 99999999,
00079 kMAXTABLENAMELEN = 80};
00080
00081 std::string GetVldDescr(const char* tableName,
00082 Bool_t isTemporary = false);
00083 void SetLogLevel(int level);
00084
00085
00086
00087 Int_t GetTimeGate(const std::string& tableName);
00088 void SetTimeGate(const std::string& tableName, Int_t timeGate);
00089
00090
00091
00092 std::string MakeDateTimeString(const TVldTimeStamp& timeStamp);
00093 TVldTimeStamp MakeTimeStamp(const std::string& sqlDateTime,
00094 Bool_t* ok =0);
00095
00096
00097
00098 Bool_t NotGlobalSeqNo(UInt_t seqNo);
00099
00100
00101
00102
00103 }
00104 #endif // XYZDBI_H
00105