ROOT  6.06/09
Reference Guide
TMySQLRow.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_TMySQLRow
13 #define ROOT_TMySQLRow
14 
15 #ifndef ROOT_TSQLRow
16 #include "TSQLRow.h"
17 #endif
18 
19 #include <mysql.h>
20 
21 class TMySQLRow : public TSQLRow {
22 
23 private:
24  MYSQL_RES *fResult; // current result set
25  MYSQL_ROW fFields; // current row
26  ULong_t *fFieldLength; // length of each field in the row
27 
28  Bool_t IsValid(Int_t field);
29 
30 public:
31  TMySQLRow(void *result, ULong_t rowHandle);
32  ~TMySQLRow();
33 
34  void Close(Option_t *opt="");
36  const char *GetField(Int_t field);
37 
38  ClassDef(TMySQLRow,0) // One row of MySQL query result
39 };
40 
41 #endif
42 
const char Option_t
Definition: RtypesCore.h:62
TMySQLRow(void *result, ULong_t rowHandle)
void Close(Option_t *opt="")
Close row.
Definition: TMySQLRow.cxx:39
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
~TMySQLRow()
Destroy row object.
Definition: TMySQLRow.cxx:30
#define ClassDef(name, id)
Definition: Rtypes.h:254
MYSQL_RES * fResult
Definition: TMySQLRow.h:24
ULong_t * fFieldLength
Definition: TMySQLRow.h:26
MYSQL_ROW fFields
Definition: TMySQLRow.h:25
ULong_t GetFieldLength(Int_t field)
Get length in bytes of specified field.
Definition: TMySQLRow.cxx:68
unsigned long ULong_t
Definition: RtypesCore.h:51
const char * GetField(Int_t field)
Get specified field from row (0 <= field < GetFieldCount()).
Definition: TMySQLRow.cxx:87
Bool_t IsValid(Int_t field)
Check if row is open and field index within range.
Definition: TMySQLRow.cxx:52
double result[121]