ROOT  6.06/09
Reference Guide
TSapDBRow.h
Go to the documentation of this file.
1 // @(#)root/sapdb:$Id$
2 // Author: Mark Hemberger & Fons Rademakers 03/08/2001
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2001, 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_TSapDBRow
13 #define ROOT_TSapDBRow
14 
15 #ifndef ROOT_TSQLRow
16 #include "TSQLRow.h"
17 #endif
18 
19 #if !defined(__CINT__)
20 #include <sys/time.h>
21 #include <WINDOWS.H>
22 #ifdef min
23 #undef min
24 #endif
25 #ifdef max
26 #undef max
27 #endif
28 #include <sql.h>
29 #include <sqlext.h>
30 #else
31 typedef long SQLHSTMT;
32 #endif
33 
34 class TString;
35 
36 
37 class TSapDBRow : public TSQLRow {
38 
39 private:
40  SQLHSTMT fResult; // current result set
41  Int_t fFieldCount; // number of fields in row
42  ULong_t *fFieldLength; // length of each field in the row
43  TString *fFieldValue; // value of each field in the row
44 
45  Bool_t IsValid(Int_t field);
46 
47 public:
48  TSapDBRow(SQLHSTMT fResult, Int_t nfields);
49  ~TSapDBRow();
50 
51  void Close(Option_t *opt="");
53  const char *GetField(Int_t field);
54 
55  ClassDef(TSapDBRow,0) // One row of SapDB query result
56 };
57 
58 #endif
TString * fFieldValue
Definition: TSapDBRow.h:43
Int_t fFieldCount
Definition: TSapDBRow.h:41
const char Option_t
Definition: RtypesCore.h:62
void Close(Option_t *opt="")
Close row.
Definition: TSapDBRow.cxx:41
const char * GetField(Int_t field)
Get specified field from row (0 <= field < GetFieldCount()).
Definition: TSapDBRow.cxx:105
Basic string class.
Definition: TString.h:137
ULong_t GetFieldLength(Int_t field)
Get length in bytes of specified field.
Definition: TSapDBRow.cxx:67
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
#define ClassDef(name, id)
Definition: Rtypes.h:254
Bool_t IsValid(Int_t field)
Check if row is open and field index within range.
Definition: TSapDBRow.cxx:54
ULong_t * fFieldLength
Definition: TSapDBRow.h:42
TSapDBRow(SQLHSTMT fResult, Int_t nfields)
SQLHSTMT fResult
Definition: TSapDBRow.h:40
unsigned long ULong_t
Definition: RtypesCore.h:51
~TSapDBRow()
Destroy row object.
Definition: TSapDBRow.cxx:32