ROOT  6.06/09
Reference Guide
TMySQLResult.h
Go to the documentation of this file.
1 // @(#)root/mysql:$Id$
2 // Author: Fons Rademakers 15/02/2000
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, 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_TMySQLResult
13 #define ROOT_TMySQLResult
14 
15 #ifndef ROOT_TSQLResult
16 #include "TSQLResult.h"
17 #endif
18 
19 #include <mysql.h>
20 
21 class TMySQLResult : public TSQLResult {
22 
23 private:
24  MYSQL_RES *fResult; // query result (rows)
25  MYSQL_FIELD *fFieldInfo; // info for each field in the row
26 
27  Bool_t IsValid(Int_t field);
28 
29 public:
30  TMySQLResult(void *result);
31  ~TMySQLResult();
32 
33  void Close(Option_t *opt="");
35  const char *GetFieldName(Int_t field);
36  TSQLRow *Next();
37 
38  ClassDef(TMySQLResult,0) // MySQL query result
39 };
40 
41 #endif
const char Option_t
Definition: RtypesCore.h:62
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TMySQLResult(void *result)
MYSQL_RES * fResult
Definition: TMySQLResult.h:24
TSQLRow * Next()
Get next query result row.
#define ClassDef(name, id)
Definition: Rtypes.h:254
Bool_t IsValid(Int_t field)
Check if result set is open and field index within range.
MYSQL_FIELD * fFieldInfo
Definition: TMySQLResult.h:25
~TMySQLResult()
Cleanup MySQL query result.
void Close(Option_t *opt="")
Close query result.
const char * GetFieldName(Int_t field)
Get name of specified field.
double result[121]
Int_t GetFieldCount()
Get number of fields in result.