Logo ROOT   6.16/01
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#include "TSQLResult.h"
16
17#if !defined(__CINT__)
18#include <libpq-fe.h>
19#else
20struct PGresult;
21#endif
22
23
24class TPgSQLResult : public TSQLResult {
25
26private:
27 PGresult *fResult; // query result (rows)
28 ULong_t fCurrentRow; // info to result row
29
30 Bool_t IsValid(Int_t field);
31
32public:
33 TPgSQLResult(void *result);
35
36 void Close(Option_t *opt="");
38 const char *GetFieldName(Int_t field);
39 TSQLRow *Next();
40
41 ClassDef(TPgSQLResult, 0) // PgSQL query result
42};
43
44#endif
int Int_t
Definition: RtypesCore.h:41
unsigned long ULong_t
Definition: RtypesCore.h:51
bool Bool_t
Definition: RtypesCore.h:59
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:324
TPgSQLResult(void *result)
PgSQL query result.
PGresult * fResult
Definition: TPgSQLResult.h:27
void Close(Option_t *opt="")
Close query result.
Int_t GetFieldCount()
Get number of fields in result.
const char * GetFieldName(Int_t field)
Get name of specified field.
Bool_t IsValid(Int_t field)
Check if result set is open and field index within range.
~TPgSQLResult()
Cleanup PgSQL query result.
TSQLRow * Next()
Get next query result row.
ULong_t fCurrentRow
Definition: TPgSQLResult.h:28