Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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{nullptr}; // query result (rows)
23 MYSQL_FIELD *fFieldInfo{nullptr}; // 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="") final;
32 Int_t GetFieldCount() final;
33 const char *GetFieldName(Int_t field) final;
34 TSQLRow *Next() final;
35
36 ClassDefOverride(TMySQLResult,0) // MySQL query result
37};
38
39#endif
int Int_t
Definition RtypesCore.h:45
bool Bool_t
Definition RtypesCore.h:63
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:329
TSQLRow * Next() final
Get next query result row.
const char * GetFieldName(Int_t field) final
Get name of specified field.
MYSQL_FIELD * fFieldInfo
Int_t GetFieldCount() final
Get number of fields in result.
~TMySQLResult()
Cleanup MySQL query result.
MYSQL_RES * fResult
Bool_t IsValid(Int_t field)
Check if result set is open and field index within range.
void Close(Option_t *opt="") final
Close query result.