00001 // @(#)root/net:$Id: TSQLResult.h 23091 2008-04-09 15:04:27Z rdm $ 00002 // Author: Fons Rademakers 25/11/99 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2000, 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_TSQLResult 00013 #define ROOT_TSQLResult 00014 00015 00016 ////////////////////////////////////////////////////////////////////////// 00017 // // 00018 // TSQLResult // 00019 // // 00020 // Abstract base class defining interface to a SQL query result. // 00021 // Objects of this class are created by TSQLServer methods. // 00022 // // 00023 // Related classes are TSQLServer and TSQLRow. // 00024 // // 00025 ////////////////////////////////////////////////////////////////////////// 00026 00027 #ifndef ROOT_TObject 00028 #include "TObject.h" 00029 #endif 00030 00031 class TSQLRow; 00032 00033 00034 class TSQLResult : public TObject { 00035 00036 protected: 00037 Int_t fRowCount; // number of rows in result 00038 00039 TSQLResult() : fRowCount(0) { } 00040 00041 public: 00042 virtual ~TSQLResult() { } 00043 00044 virtual void Close(Option_t *option="") = 0; 00045 virtual Int_t GetFieldCount() = 0; 00046 virtual const char *GetFieldName(Int_t field) = 0; 00047 virtual Int_t GetRowCount() const { return fRowCount; } 00048 virtual TSQLRow *Next() = 0; 00049 00050 ClassDef(TSQLResult,0) // SQL query result 00051 }; 00052 00053 #endif