Logo ROOT  
Reference Guide
TSQLiteRow.h
Go to the documentation of this file.
1// @(#)root/sqlite:
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_TSQLiteRow
13#define ROOT_TSQLiteRow
14
15#include "TSQLRow.h"
16
17#include <sqlite3.h>
18
19class TSQLiteRow : public TSQLRow {
20
21private:
22 sqlite3_stmt *fResult{nullptr}; ///<! current result set
23 Bool_t IsValid(Int_t field);
24
25public:
26 TSQLiteRow(void *result, ULong_t rowHandle);
28
29 void Close(Option_t *opt="") final;
30 ULong_t GetFieldLength(Int_t field) final;
31 const char *GetField(Int_t field) final;
32
33 ClassDefOverride(TSQLiteRow,0) // One row of SQLite query result
34};
35
36#endif
int Int_t
Definition: RtypesCore.h:43
unsigned long ULong_t
Definition: RtypesCore.h:53
bool Bool_t
Definition: RtypesCore.h:61
const char Option_t
Definition: RtypesCore.h:64
#define ClassDefOverride(name, id)
Definition: Rtypes.h:326
Bool_t IsValid(Int_t field)
Check if row is open and field index within range.
Definition: TSQLiteRow.cxx:47
sqlite3_stmt * fResult
! current result set
Definition: TSQLiteRow.h:22
const char * GetField(Int_t field) final
Get specified field from row (0 <= field < GetFieldCount()).
Definition: TSQLiteRow.cxx:81
~TSQLiteRow()
Destroy row object.
Definition: TSQLiteRow.cxx:30
TSQLiteRow(void *result, ULong_t rowHandle)
Single row of query result.
Definition: TSQLiteRow.cxx:22
ULong_t GetFieldLength(Int_t field) final
Get length in bytes of specified field.
Definition: TSQLiteRow.cxx:59
void Close(Option_t *opt="") final
Close row.
Definition: TSQLiteRow.cxx:39