00001 // @(#)root/pgsql:$Id: TPgSQLRow.h 20882 2007-11-19 11:31:26Z rdm $ 00002 // Author: g.p.ciceri <gp.ciceri@acm.org> 01/06/2001 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. * 00006 * All rights reserved. * 00007 * * 00008 * For the licensing terms see $ROOTSYS/LICENSE. * 00009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00010 *************************************************************************/ 00011 00012 #ifndef ROOT_TPgSQLRow 00013 #define ROOT_TPgSQLRow 00014 00015 #ifndef ROOT_TSQLRow 00016 #include "TSQLRow.h" 00017 #endif 00018 00019 #if !defined(__CINT__) 00020 #include <libpq-fe.h> 00021 #else 00022 struct PGresult; 00023 typedef char **PGresAttValue; 00024 #endif 00025 00026 00027 class TPgSQLRow : public TSQLRow { 00028 00029 private: 00030 PGresult *fResult; // current result set 00031 ULong_t fRowNum; // row number 00032 00033 Bool_t IsValid(Int_t field); 00034 00035 public: 00036 TPgSQLRow(void *result, ULong_t rowHandle); 00037 ~TPgSQLRow(); 00038 00039 void Close(Option_t *opt=""); 00040 ULong_t GetFieldLength(Int_t field); 00041 const char *GetField(Int_t field); 00042 00043 ClassDef(TPgSQLRow,0) // One row of PgSQL query result 00044 }; 00045 00046 #endif