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
17struct pg_result;
18typedef struct pg_result PGresult;
19
20class TPgSQLResult : public TSQLResult {
21
22private:
23 PGresult *fResult{nullptr}; // query result (rows)
24 ULong_t fCurrentRow{0}; // info to result row
25
26 Bool_t IsValid(Int_t field);
27
28public:
31
32 void Close(Option_t *opt="") final;
33 Int_t GetFieldCount() final;
34 const char *GetFieldName(Int_t field) final;
35 TSQLRow *Next() final;
36
37 ClassDefOverride(TPgSQLResult, 0) // PgSQL query result
38};
39
40#endif
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
unsigned long ULong_t
Definition RtypesCore.h:55
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
struct pg_result PGresult
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.