KaliVeda
Toolkit for HIC analysis
KVSQLiteResult.h
1 
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 
17 class sqlite3_stmt;
18 
28 class KVSQLiteResult : public TSQLResult {
29 
30 private:
31  sqlite3_stmt* fResult{nullptr}; // query result (rows)
32 
33  Bool_t IsValid(Int_t field);
34 
35 public:
36  KVSQLiteResult(void* result);
38 
39  void Close(Option_t* opt = "") final;
40  Int_t GetFieldCount() final;
41  const char* GetFieldName(Int_t field) final;
42  Int_t GetRowCount() const final;
43  TSQLRow* Next() final;
44 
45  ClassDefOverride(KVSQLiteResult, 0) // SQLite query result
46 };
47 
48 #endif
int Int_t
bool Bool_t
const char Option_t
Modified copy of TSQLiteResult.
TSQLRow * Next() final
const char * GetFieldName(Int_t field) final
Get name of specified field.
KVSQLiteResult(void *result)
SQLite query result.
sqlite3_stmt * fResult
void Close(Option_t *opt="") final
Close query result.
~KVSQLiteResult()
Cleanup SQLite query result.
Bool_t IsValid(Int_t field)
Check if result set is open and field index within range.
Int_t GetFieldCount() final
Get number of fields in result.
Int_t GetRowCount() const final