Logo ROOT  
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
19class TMySQLResult : public TSQLResult {
20
21private:
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
27public:
28 TMySQLResult(void *result);
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
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:326
const char * GetFieldName(Int_t field)
Get name of specified field.
MYSQL_FIELD * fFieldInfo
Definition: TMySQLResult.h:23
TSQLRow * Next()
Get next query result row.
void Close(Option_t *opt="")
Close query result.
~TMySQLResult()
Cleanup MySQL query result.
MYSQL_RES * fResult
Definition: TMySQLResult.h:22
Int_t GetFieldCount()
Get number of fields in result.
Bool_t IsValid(Int_t field)
Check if result set is open and field index within range.
TMySQLResult(void *result)
MySQL query result.