00001 // @(#)root/mysql:$Id: TMySQLResult.h 29976 2009-08-31 13:34:53Z rdm $ 00002 // Author: Fons Rademakers 15/02/2000 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_TMySQLResult 00013 #define ROOT_TMySQLResult 00014 00015 #ifndef ROOT_TSQLResult 00016 #include "TSQLResult.h" 00017 #endif 00018 00019 #if !defined(__CINT__) 00020 #ifdef R__WIN32 00021 #include <winsock2.h> 00022 #else 00023 #include <sys/time.h> 00024 #endif 00025 #include <mysql.h> 00026 #else 00027 struct MYSQL_RES; 00028 struct MYSQL_FIELD; 00029 #endif 00030 00031 00032 class TMySQLResult : public TSQLResult { 00033 00034 private: 00035 MYSQL_RES *fResult; // query result (rows) 00036 MYSQL_FIELD *fFieldInfo; // info for each field in the row 00037 00038 Bool_t IsValid(Int_t field); 00039 00040 public: 00041 TMySQLResult(void *result); 00042 ~TMySQLResult(); 00043 00044 void Close(Option_t *opt=""); 00045 Int_t GetFieldCount(); 00046 const char *GetFieldName(Int_t field); 00047 TSQLRow *Next(); 00048 00049 ClassDef(TMySQLResult,0) // MySQL query result 00050 }; 00051 00052 #endif