Logo ROOT   6.12/07
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 #include "TSQLResult.h"
16 
17 #include <mysql.h>
18 
19 class TMySQLResult : public TSQLResult {
20 
21 private:
22  MYSQL_RES *fResult; // query result (rows)
23  MYSQL_FIELD *fFieldInfo; // info for each field in the row
24 
25  Bool_t IsValid(Int_t field);
26 
27 public:
28  TMySQLResult(void *result);
29  ~TMySQLResult();
30 
31  void Close(Option_t *opt="");
33  const char *GetFieldName(Int_t field);
34  TSQLRow *Next();
35 
36  ClassDef(TMySQLResult,0) // MySQL query result
37 };
38 
39 #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 query result.
MYSQL_RES * fResult
Definition: TMySQLResult.h:22
TSQLRow * Next()
Get next query result row.
#define ClassDef(name, id)
Definition: Rtypes.h:320
Bool_t IsValid(Int_t field)
Check if result set is open and field index within range.
MYSQL_FIELD * fFieldInfo
Definition: TMySQLResult.h:23
~TMySQLResult()
Cleanup MySQL query result.
void Close(Option_t *opt="")
Close query result.
const char * GetFieldName(Int_t field)
Get name of specified field.
Int_t GetFieldCount()
Get number of fields in result.