Logo ROOT  
Reference Guide
TOracleRow.h
Go to the documentation of this file.
1// @(#)root/physics:$Id$
2// Author: Yan Liu and Shaowen Wang 23/11/04
3
4/*************************************************************************
5 * Copyright (C) 1995-2005, 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_TOracleRow
13#define ROOT_TOracleRow
14
15#include "TSQLRow.h"
16
17#include <vector>
18
19namespace oracle {
20namespace occi {
21 class ResultSet;
22 struct MetaData;
23}
24}
25
26class TOracleRow : public TSQLRow {
27
28private:
29 oracle::occi::ResultSet *fResult{nullptr}; // current result set
30 std::vector<oracle::occi::MetaData> *fFieldInfo{nullptr}; // metadata for columns
32 char **fFieldsBuffer{nullptr};
33
34 Bool_t IsValid(Int_t field);
35
36 TOracleRow(const TOracleRow &) = delete;
37 TOracleRow &operator=(const TOracleRow &) = delete;
38
39protected:
40 void GetRowData();
41
42public:
43 TOracleRow(oracle::occi::ResultSet *rs,
44 std::vector<oracle::occi::MetaData> *fieldMetaData);
46
47 void Close(Option_t *opt="") final;
48 ULong_t GetFieldLength(Int_t field) final;
49 const char *GetField(Int_t field) final;
50
51 ClassDefOverride(TOracleRow,0) // One row of Oracle query result
52};
53
54#endif
bool Bool_t
Definition: RtypesCore.h:63
int Int_t
Definition: RtypesCore.h:45
unsigned long ULong_t
Definition: RtypesCore.h:55
const char Option_t
Definition: RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
~TOracleRow()
Destroy row object.
Definition: TOracleRow.cxx:39
TOracleRow & operator=(const TOracleRow &)=delete
ULong_t GetFieldLength(Int_t field) final
Get length in bytes of specified field.
Definition: TOracleRow.cxx:81
Bool_t IsValid(Int_t field)
Check if row is open and field index within range.
Definition: TOracleRow.cxx:65
Int_t fFieldCount
Definition: TOracleRow.h:31
TOracleRow(const TOracleRow &)=delete
std::vector< oracle::occi::MetaData > * fFieldInfo
Definition: TOracleRow.h:30
void GetRowData()
Definition: TOracleRow.cxx:105
void Close(Option_t *opt="") final
Close row.
Definition: TOracleRow.cxx:47
oracle::occi::ResultSet * fResult
Definition: TOracleRow.h:29
const char * GetField(Int_t field) final
Definition: TOracleRow.cxx:93
char ** fFieldsBuffer
Definition: TOracleRow.h:32