TMySQLRow.h

Go to the documentation of this file.
00001 // @(#)root/mysql:$Id: TMySQLRow.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_TMySQLRow
00013 #define ROOT_TMySQLRow
00014 
00015 #ifndef ROOT_TSQLRow
00016 #include "TSQLRow.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 typedef char **MYSQL_ROW;
00029 #endif
00030 
00031 
00032 class TMySQLRow : public TSQLRow {
00033 
00034 private:
00035    MYSQL_RES   *fResult;       // current result set
00036    MYSQL_ROW    fFields;       // current row
00037    ULong_t     *fFieldLength;  // length of each field in the row
00038 
00039    Bool_t  IsValid(Int_t field);
00040 
00041 public:
00042    TMySQLRow(void *result, ULong_t rowHandle);
00043    ~TMySQLRow();
00044 
00045    void        Close(Option_t *opt="");
00046    ULong_t     GetFieldLength(Int_t field);
00047    const char *GetField(Int_t field);
00048 
00049    ClassDef(TMySQLRow,0)  // One row of MySQL query result
00050 };
00051 
00052 #endif
00053 

Generated on Tue Jul 5 15:14:37 2011 for ROOT_528-00b_version by  doxygen 1.5.1