/search.css" rel="stylesheet" type="text/css"/> /search.js">
00001 // $Id: Dbi.h,v 1.39 2007/04/26 14:19:57 west Exp $ 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 // Types and enum 00041 00042 typedef Int_t Task; 00043 00044 enum TaskTypes{ kAnyTask = -1, // Use to disable task selection in context queries. 00045 kDefaultTask = 0 00046 }; 00047 00048 00049 typedef Int_t SubSite; 00050 00051 enum SubSiteTypes{ kAnySubSite = -1, // Use to disable task selection in context queries. 00052 kDefaultSubSite = 0 00053 }; 00054 00055 00056 00057 enum TypeRegimes{ kRootRegime = 0, 00058 kSQLRegime = 1 00059 }; 00060 00061 enum DataTypes{ kUnknown, 00062 kBool, // concept 00063 kChar, // concept 00064 kUChar, // concept 00065 kTiny, 00066 kUTiny, 00067 kShort, 00068 kUShort, 00069 kInt, // concept 00070 kUInt, // concept 00071 kLong, 00072 kULong, 00073 kFloat, // concept 00074 kDouble, 00075 kString, // concept 00076 kTString, 00077 kDate // concept 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, // Max local SeqNo. 00092 kMAXTABLENAMELEN = 80}; // Max length of table name. 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 // DateTime conversion utilities. 00104 std::string MakeDateTimeString(const TimeStamp& timeStamp); 00105 TimeStamp MakeTimeStamp(const std::string& sqlDateTime, 00106 Bool_t* ok =0); 00107 std::string UsernameFromEnvironment(); 00108 00109 // SeqNo utilities 00110 Bool_t NotGlobalSeqNo(UInt_t seqNo); 00111 00112 00113 } 00114 00115 #endif // DBI_H