ROOT  6.06/09
Reference Guide
TSQLiteResult.h
Go to the documentation of this file.
1 // @(#)root/sqlite:$Id$
2 // Author: o.freyermuth <o.f@cern.ch>, 01/06/2013
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2013, 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_TSQLiteResult
13 #define ROOT_TSQLiteResult
14 
15 #ifndef ROOT_TSQLResult
16 #include "TSQLResult.h"
17 #endif
18 
19 #if !defined(__CINT__)
20 #include <sqlite3.h>
21 #else
22 struct sqlite3_stmt;
23 #endif
24 
25 
26 class TSQLiteResult : public TSQLResult {
27 
28 private:
29  sqlite3_stmt *fResult; // query result (rows)
30 
31  Bool_t IsValid(Int_t field);
32 
33 public:
34  TSQLiteResult(void *result);
36 
37  void Close(Option_t *opt="");
39  const char *GetFieldName(Int_t field);
40  TSQLRow *Next();
41 
42  ClassDef(TSQLiteResult, 0) // SQLite query result
43 };
44 
45 #endif
const char * GetFieldName(Int_t field)
Get name of specified field.
const char Option_t
Definition: RtypesCore.h:62
Bool_t IsValid(Int_t field)
Check if result set is open and field index within range.
void Close(Option_t *opt="")
Close query result.
~TSQLiteResult()
Cleanup SQLite query result.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
sqlite3_stmt * fResult
Definition: TSQLiteResult.h:29
#define ClassDef(name, id)
Definition: Rtypes.h:254
TSQLiteResult(void *result)
Int_t GetFieldCount()
Get number of fields in result.
TSQLRow * Next()
Get next query result row.
double result[121]