ROOT  6.06/09
Reference Guide
TPgSQLResult.h
Go to the documentation of this file.
1 // @(#)root/pgsql:$Id$
2 // Author: g.p.ciceri <gp.ciceri@acm.org> 01/06/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_TPgSQLResult
13 #define ROOT_TPgSQLResult
14 
15 #ifndef ROOT_TSQLResult
16 #include "TSQLResult.h"
17 #endif
18 
19 #if !defined(__CINT__)
20 #include <libpq-fe.h>
21 #else
22 struct PGresult;
23 #endif
24 
25 
26 class TPgSQLResult : public TSQLResult {
27 
28 private:
29  PGresult *fResult; // query result (rows)
30  ULong_t fCurrentRow; // info to result row
31 
32  Bool_t IsValid(Int_t field);
33 
34 public:
35  TPgSQLResult(void *result);
36  ~TPgSQLResult();
37 
38  void Close(Option_t *opt="");
40  const char *GetFieldName(Int_t field);
41  TSQLRow *Next();
42 
43  ClassDef(TPgSQLResult, 0) // PgSQL query result
44 };
45 
46 #endif
const char Option_t
Definition: RtypesCore.h:62
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TSQLRow * Next()
Get next query result row.
Bool_t IsValid(Int_t field)
Check if result set is open and field index within range.
PGresult * fResult
Definition: TPgSQLResult.h:29
Int_t GetFieldCount()
Get number of fields in result.
#define ClassDef(name, id)
Definition: Rtypes.h:254
const char * GetFieldName(Int_t field)
Get name of specified field.
void Close(Option_t *opt="")
Close query result.
unsigned long ULong_t
Definition: RtypesCore.h:51
TPgSQLResult(void *result)
double result[121]
~TPgSQLResult()
Cleanup PgSQL query result.
ULong_t fCurrentRow
Definition: TPgSQLResult.h:30