Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

msd_data.h

00001 //-----------------------------------------------------
00002 // msd_data.h
00003 //
00004 // Project: PDBe API Framework, EBI  
00005 // Module:  DATA Layer Classes for PDBe API Framework 
00006 //
00007 // 
00008 // Data Layer
00009 // Last updated: 25 February 2004 10:17
00010 // (C) Siamak Sobhany
00011 //------------------------------------------------------
00012 
00013 
00014 
00015 #ifndef __MSD_DATA_H__
00016 #define __MSD_DATA_H__
00017 
00018 #ifndef __MSD_DATATYPES_H__
00019 #include "msd_datatypes.h"
00020 #endif
00021 
00022 //using namespace std;
00023 
00024 
00025 
00026 //###class MSDColumn {
00027 //### public:
00028 //###  char strCVal[32];               
00029 //###  double  dfCVal;                 
00030 //###  float fCVal;                    
00031 //###  int iCVal;                      
00032 //###  unsigned int uiCVal;            
00033 //###  short int shiCVal;              
00034 //###  long int liCVal;                
00035 //###  otl_datetime dtCVal;           
00036 //###  otl_long_string lcCVal;  
00037 //###  otl_long_string rlCVal;  
00038 //###  otl_long_string clobCVal;
00039 //###  otl_long_string blobCVal;
00040 //###  //       otl_lob_stream blobCVal;
00041 //###  int coltype;   // database dependent, column datatype code.
00042 //###                 // for more detail, see the OCIx and the ODBC manuals.
00043 //###  int otltype;   // OTL defined, column datatype code
00044 //###  int colsize;   // column length
00045 //###  int colscale;  // for numeric columns, column scale
00046 //###  int colprec;   // for numeric columns, column precision
00047 //###  int colnullok; // indicator whether column is nullable or not
00048 //###  let colname; 
00049 //###  let colvalue;
00050 //###  MSDColumn(){};
00051 //###  ~MSDColumn(){};
00052 //###  void ValRead(msdbStream& os, int idx);
00053 //###};
00054 
00055 
00059 class MSDSelect {
00060  
00061  
00062  public:
00063  int buff;
00064  
00065  
00066  MSDSelect();
00067  void InitSql(msdbConnect& r_db, char* stm);
00068  //MSDColumn * cv;
00069  let collist;
00070  let colliststr;
00071  ~MSDSelect(){};
00072  void MakeRecord();
00073  void GetNext();
00074  int GetRowNum();
00075  void SetCriteria(char* strCVal);    
00076  void SetCriteria(double  dfCVal);      
00077  void SetCriteria(float fCVal);         
00078  void SetCriteria(int iCVal);           
00079  void SetCriteria(unsigned int uiCVal); 
00080  void SetCriteria(short int shiCVal);   
00081  void SetCriteria(long int liCVal); 
00082  int GetVal(int col, float& f);
00083  int GetVal(int col, int& i);
00084  int GetVal(int col, char*& val);
00085  int GetVal(int col, double& d);
00086  
00087  protected:
00088  int j;
00089  otl_column_desc * desc;
00090  int desc_len;
00091  msdbStream * pos;
00092  msd_array * p;
00093  }; 
00094 
00095 
00096 class MSDHandle {
00097  public:
00098    const msdbConnect * vp_dbhandle[MAXCONN];
00099    const MSDSelect * vp_sql[MAXCONN][MAXSQL];
00100    MSDHandle();
00101    ~MSDHandle(){};
00102 };
00103 
00104 
00105 
00106 
00107 void new_exec_query (int bf, msdbConnect& r_db, char* stm, MSDDataSet& rs);
00108 int msd_exec_query (int bf, msdbConnect& r_db, char* stm, MSDDataSet& rs, char* rs_table, const char* argtype ,...);
00109 
00110 let  msd_make_rowlist(let se);
00111 
00112 void genselect(msdbConnect& r_db, char* stm);
00113 
00114 #endif //__MSD_DATA_H__

Generated on Fri Apr 16 13:47:40 2004 for MSDAPI by doxygen 1.3.4-20031005