Logo ROOT  
Reference Guide
TSQLResult.h
Go to the documentation of this file.
1 // @(#)root/net:$Id$
2 // Author: Fons Rademakers 25/11/99
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_TSQLResult
13 #define ROOT_TSQLResult
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TSQLResult //
19 // //
20 // Abstract base class defining interface to a SQL query result. //
21 // Objects of this class are created by TSQLServer methods. //
22 // //
23 // Related classes are TSQLServer and TSQLRow. //
24 // //
25 //////////////////////////////////////////////////////////////////////////
26 
27 #include "TObject.h"
28 
29 class TSQLRow;
30 
31 
32 class TSQLResult : public TObject {
33 
34 protected:
35  Int_t fRowCount; // number of rows in result
36 
37  TSQLResult() : fRowCount(0) { }
38 
39 public:
40  virtual ~TSQLResult() { }
41 
42  virtual void Close(Option_t *option="") = 0;
43  virtual Int_t GetFieldCount() = 0;
44  virtual const char *GetFieldName(Int_t field) = 0;
45  virtual Int_t GetRowCount() const { return fRowCount; }
46  virtual TSQLRow *Next() = 0;
47 
48  ClassDef(TSQLResult,0) // SQL query result
49 };
50 
51 #endif
TSQLResult::Next
virtual TSQLRow * Next()=0
TSQLResult::Close
virtual void Close(Option_t *option="")=0
Int_t
int Int_t
Definition: RtypesCore.h:45
TSQLResult::~TSQLResult
virtual ~TSQLResult()
Definition: TSQLResult.h:40
TSQLResult
Definition: TSQLResult.h:32
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TSQLRow
Definition: TSQLRow.h:30
TSQLResult::TSQLResult
TSQLResult()
Definition: TSQLResult.h:37
TObject.h
TObject
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TSQLResult::fRowCount
Int_t fRowCount
Definition: TSQLResult.h:35
TSQLResult::GetFieldName
virtual const char * GetFieldName(Int_t field)=0
TSQLResult::GetRowCount
virtual Int_t GetRowCount() const
Definition: TSQLResult.h:45
int
TSQLResult::GetFieldCount
virtual Int_t GetFieldCount()=0