#ifndef ROOT_TOracleServer #define ROOT_TOracleServer #ifndef ROOT_TSQLServer #include "TSQLServer.h" #endif #include #if !defined(__CINT__) #include #include #else struct SQLDA ; #endif /* Maximum Length of username and passsword. */ #define UNAME_LEN 20 #define PWD_LEN 40 /* Maximum number of select-list items or bind variables. */ #define MAX_ITEMS 100 /* Maximum lengths of the _names_ of the select-list items or indicator variables. */ #define MAX_VNAME_LEN 30 #define MAX_INAME_LEN 30 #ifndef NULL #define NULL 0 #endif class TOracleServer : public TSQLServer { private: char *dml_commands; /* Define a buffer to hold longjmp state info. */ SQLDA *bind_dp; SQLDA *select_dp; /* A global flag for the error routine. */ jmp_buf jmp_continue,jmp_continue1; Int_t parse_flag ; Int_t scale; void error_info(); void connect_error(); void sql_error(); Int_t alloc_descriptors(Int_t size, Int_t max_vname_len , Int_t max_iname_len); void process_select_list( ); void memory_free( ); Int_t RowCount(); public: TOracleServer(const char *db, const char *uid, const char *pw); ~TOracleServer(); void Close(Option_t *opt=""); TSQLResult *Query(const char *sql); Int_t SelectDataBase(const char *dbname); TSQLResult *GetDataBases(const char *wild = 0); TSQLResult *GetTables(const char *dbname, const char *wild = 0); TSQLResult *GetColumns(const char *dbname, const char *table, const char *wild = 0); Int_t CreateDataBase(const char *dbname); Int_t DropDataBase(const char *dbname); Int_t Reload(); Int_t Shutdown(); const char *ServerInfo(); ClassDef(TOracleServer,0) // Connection to Oracle server }; #endif