Logo ROOT   6.10/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 #include "TSQLRow.h"
16 
17 #if !defined(__CINT__)
18 #include <sys/time.h>
19 #include <WINDOWS.H>
20 #ifdef min
21 #undef min
22 #endif
23 #ifdef max
24 #undef max
25 #endif
26 #include <sql.h>
27 #include <sqlext.h>
28 #else
29 typedef long SQLHSTMT;
30 #endif
31 
32 class TString;
33 
34 
35 class TSapDBRow : public TSQLRow {
36 
37 private:
38  SQLHSTMT fResult; // current result set
39  Int_t fFieldCount; // number of fields in row
40  ULong_t *fFieldLength; // length of each field in the row
41  TString *fFieldValue; // value of each field in the row
42 
43  Bool_t IsValid(Int_t field);
44 
45 public:
46  TSapDBRow(SQLHSTMT fResult, Int_t nfields);
47  ~TSapDBRow();
48 
49  void Close(Option_t *opt="");
51  const char *GetField(Int_t field);
52 
53  ClassDef(TSapDBRow,0) // One row of SapDB query result
54 };
55 
56 #endif
TString * fFieldValue
Definition: TSapDBRow.h:41
Int_t fFieldCount
Definition: TSapDBRow.h:39
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:129
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:297
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:40
TSapDBRow(SQLHSTMT fResult, Int_t nfields)
Single row of query result.
Definition: TSapDBRow.cxx:21
SQLHSTMT fResult
Definition: TSapDBRow.h:38
unsigned long ULong_t
Definition: RtypesCore.h:51
~TSapDBRow()
Destroy row object.
Definition: TSapDBRow.cxx:32