Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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#include "TSQLResult.h"
16
17class sqlite3_stmt;
18
19class TSQLiteResult : public TSQLResult {
20
21private:
22 sqlite3_stmt *fResult{nullptr}; // query result (rows)
23
24 Bool_t IsValid(Int_t field);
25
26public:
27 TSQLiteResult(void *result);
29
30 void Close(Option_t *opt="") final;
31 Int_t GetFieldCount() final;
32 const char *GetFieldName(Int_t field) final;
33 Int_t GetRowCount() const final;
34 TSQLRow *Next() final;
35
36 ClassDefOverride(TSQLiteResult, 0) // SQLite query result
37};
38
39#endif
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
void Close(Option_t *opt="") final
Close query result.
sqlite3_stmt * fResult
const char * GetFieldName(Int_t field) final
Get name of specified field.
Int_t GetRowCount() const final
SQLite can not determine the row count for a Query, return -1 instead.
~TSQLiteResult()
Cleanup SQLite query result.
TSQLRow * Next() final
Get next query result row.
Int_t GetFieldCount() final
Get number of fields in result.
Bool_t IsValid(Int_t field)
Check if result set is open and field index within range.