Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TSQLResultSet.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TSQLResultSet.h
1 // $Id: TSQLResultSet.h,v 1.1.1.1 2004/02/18 20:58:02 dave Exp $
2 
3 #ifndef RDBC_TSQLResultSet_h
4 #define RDBC_TSQLResultSet_h
5 
6 //
7 // TSQLResultSet class - provides access to a table of data
8 //
9 
10 #ifndef RDBC_TSQL_h
11 #include <RDBC/TSQL.h>
12 #endif
13 #ifndef ROOT_TArrayC
14 #include <TArrayC.h>
15 #endif
16 #ifndef ROOT_TSQLResult
17 #include <TSQLResult.h>
18 #endif
19 
20 class TSQLStatement;
21 class TList;
23 class TBuffer;
24 class TTree;
25 class RDBCRow;
27 
31 };
32 
37 };
38 
40 class TSQLResultSet: public TSQLResult, public TSQL
41 {
42 friend class TSQLStatement;
43 
44 protected:
45  RDBCRow* fRow; // row == TSQLRow
46  TSQLStatement* fStatement; // parent statement
48 
49  TSQLResultSet( TSQLStatement* stmt=0, void* imp=0 );
50 
51 public:
52  virtual ~TSQLResultSet();
53  virtual Bool_t WasNull() = 0;
54  virtual TString GetString( Int_t columnIndex ) = 0;
55  virtual Bool_t GetBoolean( Int_t columnIndex ) = 0;
56  virtual Char_t GetByte( Int_t columnIndex ) = 0;
57  virtual Short_t GetShort( Int_t columnIndex ) = 0;
58  virtual Int_t GetInt( Int_t columnIndex ) = 0;
59  virtual Long_t GetLong( Int_t columnIndex ) = 0;
60  virtual Float_t GetFloat( Int_t columnIndex ) = 0;
61  virtual Double_t GetDouble( Int_t columnIndex ) = 0;
62  virtual TArrayC GetBytes( Int_t columnIndex ) = 0;
63  virtual TSQLDate GetDate( Int_t columnIndex ) = 0;
64  virtual TSQLTime GetTime( Int_t columnIndex ) = 0;
65  virtual TSQLTimestamp GetTimestamp( Int_t columnIndex ) = 0;
66  virtual TBuffer* GetAsciiStream( Int_t columnIndex ) = 0;
67  virtual TBuffer* GetBinaryStream( Int_t columnIndex ) = 0;
68  virtual TObject* GetObject( Int_t columnIndex ) = 0;
69  virtual TString GetString( const TString& columnName ) = 0;
70  virtual Bool_t GetBoolean( const TString& columnName ) = 0;
71  virtual Char_t GetByte( const TString& columnName ) = 0;
72  virtual Short_t GetShort( const TString& columnName ) = 0;
73  virtual Int_t GetInt( const TString& columnName ) = 0;
74  virtual Long_t GetLong( const TString& columnName ) = 0;
75  virtual Float_t GetFloat( const TString& columnName ) = 0;
76  virtual Double_t GetDouble( const TString& columnName ) = 0;
77  virtual TArrayC GetBytes( const TString& columnName ) = 0;
78  virtual TSQLDate GetDate( const TString& columnName ) = 0;
79  virtual TSQLTime GetTime( const TString& columnName ) = 0;
80  virtual TSQLTimestamp GetTimestamp( const TString& columnName ) = 0;
81  virtual TBuffer* GetAsciiStream( const TString& columnName ) = 0;
82  virtual TBuffer* GetBinaryStream( const TString& columnName ) = 0;
83  virtual TObject* GetObject( const TString& columnName ) = 0;
84  virtual TString GetCursorName() = 0;
85  virtual Int_t FindColumn( const TString& columnName ) = 0;
86  virtual Bool_t IsBeforeFirst() = 0;
87  virtual Bool_t IsAfterLast() = 0;
88  virtual Bool_t IsFirst() = 0;
89  virtual Bool_t IsLast() = 0;
90  virtual void BeforeFirst() = 0;
91  virtual void AfterLast() = 0;
92  virtual void SetFetchDirection( Int_t direction ) = 0;
93  virtual Int_t GetFetchDirection() = 0;
94  virtual Int_t GetRow() = 0;
95  virtual void SetFetchSize( Int_t rows ) = 0;
96  virtual Int_t GetFetchSize() = 0;
97  virtual Int_t GetType() = 0;
98  virtual Int_t GetConcurrency() = 0;
99  virtual void UpdateNull( Int_t columnIndex ) = 0;
100  virtual void UpdateBoolean( Int_t columnIndex,Bool_t x ) = 0;
101  virtual void UpdateByte( Int_t columnIndex,Char_t x ) = 0;
102  virtual void UpdateShort( Int_t columnIndex,Short_t x ) = 0;
103  virtual void UpdateInt( Int_t columnIndex,Int_t x ) = 0;
104  virtual void UpdateLong( Int_t columnIndex,Long_t x ) = 0;
105  virtual void UpdateFloat( Int_t columnIndex, Float_t x ) = 0;
106  virtual void UpdateDouble( Int_t columnIndex,Double_t x ) = 0;
107  virtual void UpdateString( Int_t columnIndex,const TString& x ) = 0;
108  virtual void UpdateBytes( Int_t columnIndex,const TArrayC& x ) = 0;
109  virtual void UpdateDate( Int_t columnIndex,const TSQLDate& x ) = 0;
110  virtual void UpdateTime( Int_t columnIndex,const TSQLTime& x ) = 0;
111  virtual void UpdateTimestamp( Int_t columnIndex,const TSQLTimestamp& x ) = 0;
112  virtual void UpdateAsciiStream( Int_t columnIndex,TBuffer* x,Int_t length ) = 0;
113  virtual void UpdateBinaryStream( Int_t columnIndex,TBuffer* x,Int_t length ) = 0;
114  virtual void UpdateObject( Int_t columnIndex,TObject* x ) = 0;
115  virtual void UpdateNull( const TString& columnName ) = 0;
116  virtual void UpdateBoolean( const TString& columnName, Bool_t x ) = 0;
117  virtual void UpdateByte( const TString& columnName,Char_t x ) = 0;
118  virtual void UpdateShort( const TString& columnName,Short_t x ) = 0;
119  virtual void UpdateInt( const TString& columnName,Int_t x ) = 0;
120  virtual void UpdateLong( const TString& columnName,Long_t x ) = 0;
121  virtual void UpdateFloat( const TString& columnName,Float_t x ) = 0;
122  virtual void UpdateDouble( const TString& columnName,Double_t x ) = 0;
123  virtual void UpdateString( const TString& columnName,const TString& x ) = 0;
124  virtual void UpdateBytes( const TString& columnName,const TArrayC& x ) = 0;
125  virtual void UpdateDate( const TString& columnName,const TSQLDate& x ) = 0;
126  virtual void UpdateTime( const TString& columnName, const TSQLTime& x ) = 0;
127  virtual void UpdateTimestamp( const TString& columnName,const TSQLTimestamp& x ) = 0;
128  virtual void UpdateAsciiStream( const TString& columnName,TBuffer* x,Int_t length ) = 0;
129  virtual void UpdateBinaryStream( const TString& columnName,TBuffer* x,Int_t length ) = 0;
130  virtual void UpdateObject( const TString& columnName,TObject* x ) = 0;
131  virtual Bool_t RowUpdated() = 0;
132  virtual Bool_t RowInserted() = 0;
133  virtual Bool_t RowDeleted() = 0;
134  virtual void InsertRow() = 0;
135  virtual void UpdateRow() = 0;
136  virtual void DeleteRow() = 0;
137  virtual void RefreshRow() = 0;
138  virtual void CancelRowUpdates() = 0;
139  virtual void MoveToInsertRow() = 0;
140  virtual void MoveToCurrentRow() = 0;
141  virtual void Close(const Option_t *option="") = 0;
142  virtual TSQLRow* Next() = 0;
143  virtual TSQLRow* Previous() = 0;
144  virtual TSQLRow* First() = 0;
145  virtual TSQLRow* Last() = 0;
146  virtual TSQLRow* Absolute( Int_t row ) = 0;
147  virtual TSQLRow* Relative( Int_t rows ) = 0;
148  virtual TSQLResultSetMetaData* GetMetaData() = 0;
149 
150  virtual TSQLStatement* GetStatement() const { return fStatement; }
151  virtual Int_t GetFieldCount();
152  virtual const char *GetFieldName(Int_t field);
153  virtual void Print(Option_t *option="") const;
154  virtual TTree* Tree(Int_t begin=0,Int_t end=0);
155 
156 ClassDef(TSQLResultSet,0) //provides access to a table of data
157 };
158 
159 #endif // RDBC_TSQLResultSet_h