Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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#include <libpq-fe.h>
18
19class TPgSQLResult : public TSQLResult {
20
21private:
22 PGresult *fResult{nullptr}; // query result (rows)
23 ULong_t fCurrentRow{0}; // info to result row
24
25 Bool_t IsValid(Int_t field);
26
27public:
28 TPgSQLResult(void *result);
30
31 void Close(Option_t *opt="") final;
32 Int_t GetFieldCount() final;
33 const char *GetFieldName(Int_t field) final;
34 TSQLRow *Next() final;
35
36 ClassDefOverride(TPgSQLResult, 0) // PgSQL query result
37};
38
39#endif
int Int_t
Definition RtypesCore.h:45
unsigned long ULong_t
Definition RtypesCore.h:55
bool Bool_t
Definition RtypesCore.h:63
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:329
const char * GetFieldName(Int_t field) final
Get name of specified field.
PGresult * fResult
Bool_t IsValid(Int_t field)
Check if result set is open and field index within range.
Int_t GetFieldCount() final
Get number of fields in result.
~TPgSQLResult()
Cleanup PgSQL query result.
ULong_t fCurrentRow
TSQLRow * Next() final
Get next query result row.
void Close(Option_t *opt="") final
Close query result.