FEDRA emulsion software from the OPERA Collaboration
TOracleRow.h
Go to the documentation of this file.
1 // @(#)root/physics:$Name: not supported by cvs2svn $:$Id: TOracleRow.h,v 1.1 2005-10-24 13:48:29 valeri Exp $
2 // Author: Yan Liu and Shaowen Wang 23/11/04
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TOracleRow
13 #define ROOT_TOracleRow
14 
15 #ifndef ROOT_TSQLRow
16 #include "TSQLRow.h"
17 #endif
18 
19 #if !defined(__CINT__)
20 #ifndef R__WIN32
21 #include <sys/time.h>
22 #endif
23 #include <occi.h>
24 using namespace oracle::occi;
25 #else
26 class ResultSet;
27 class MetaData;
28 #endif
29 
30 class TOracleRow : public TSQLRow {
31 
32 private:
33  ResultSet *fResult; // current result set
34  std::vector<MetaData> *fFieldInfo; // metadata for columns
35  UInt_t fFieldCount;
36  std::vector<std::string> *fFields;
37  UInt_t fUpdateCount; // for dml queries
38  Int_t fResultType; // 0 - Update(dml); 1 - Select; -1 - empty
39 
40  Bool_t IsValid(Int_t field);
41 
42 protected:
43  int GetRowData();
44  int GetRowData2();
45 
46 public:
47  TOracleRow(ResultSet *rs, std::vector<MetaData> *fieldMetaData);
48  TOracleRow(UInt_t updateCount);
49  ~TOracleRow();
50 
51  void Close(Option_t *opt="");
52  ULong_t GetFieldLength(Int_t field);
53  const char *GetField(Int_t field);
54 
55  ClassDef(TOracleRow,0) // One row of Oracle query result
56 };
57 
58 #endif
Definition: TOracleRow.h:30
TOracleRow(ResultSet *rs, std::vector< MetaData > *fieldMetaData)
std::vector< std::string > * fFields
Definition: TOracleRow.h:36
Int_t fResultType
Definition: TOracleRow.h:38
UInt_t fUpdateCount
Definition: TOracleRow.h:37
std::vector< MetaData > * fFieldInfo
Definition: TOracleRow.h:34
UInt_t fFieldCount
Definition: TOracleRow.h:35
ResultSet * fResult
Definition: TOracleRow.h:33
const char * opt
Definition: mc2raw.cxx:42
file Close()