Logo ROOT   6.18/05
Reference Guide
TPgSQLRow.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_TPgSQLRow
13#define ROOT_TPgSQLRow
14
15#include "TSQLRow.h"
16
17#if !defined(__CINT__)
18#include <libpq-fe.h>
19#else
20struct PGresult;
21typedef char **PGresAttValue;
22#endif
23
24
25class TPgSQLRow : public TSQLRow {
26
27private:
28 PGresult *fResult; // current result set
29 ULong_t fRowNum; // row number
30
31 Bool_t IsValid(Int_t field);
32
33public:
34 TPgSQLRow(void *result, ULong_t rowHandle);
35 ~TPgSQLRow();
36
37 void Close(Option_t *opt="");
39 const char *GetField(Int_t field);
40
41 ClassDef(TPgSQLRow,0) // One row of 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:326
const char * GetField(Int_t field)
Get specified field from row (0 <= field < GetFieldCount()).
Definition: TPgSQLRow.cxx:80
Bool_t IsValid(Int_t field)
Check if row is open and field index within range.
Definition: TPgSQLRow.cxx:50
ULong_t fRowNum
Definition: TPgSQLRow.h:29
ULong_t GetFieldLength(Int_t field)
Get length in bytes of specified field.
Definition: TPgSQLRow.cxx:62
PGresult * fResult
Definition: TPgSQLRow.h:28
~TPgSQLRow()
Destroy row object.
Definition: TPgSQLRow.cxx:29
TPgSQLRow(void *result, ULong_t rowHandle)
Single row of query result.
Definition: TPgSQLRow.cxx:20
void Close(Option_t *opt="")
Close row.
Definition: TPgSQLRow.cxx:38