ATLAS Offline Software
Loading...
Searching...
No Matches
RDBRecordset.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
14
15
16#ifndef RDBACCESSSVC_RDBRECORDSET_H
17#define RDBACCESSSVC_RDBRECORDSET_H
18
20#include "RDBVersionAccessor.h"
21#include <string>
22
23class RDBAccessSvc;
24class IRDBQuery;
25
26namespace coral
27{
28 class ISessionProxy;
29}
30
37
38class RDBRecordset final: public IRDBRecordset
39{
40 public:
43 : m_accessSvc(accessSvc) {}
44
48 void getData(coral::ISessionProxy* session
49 , const std::string& nodeName
50 , const std::string& tagName
51 , const std::string& tagId);
52
54 unsigned int size() const override;
55
57 std::string nodeName() const override;
58
60 std::string tagName() const override;
61
64 const IRDBRecord* operator[](unsigned int index) const override;
65
67 IRDBRecordset::const_iterator begin() const override;
68
70 IRDBRecordset::const_iterator end() const override;
71
72 // Comparison operator
73 bool operator!=(const RDBRecordset& rhs) const;
74
75 // Comparison results with other recordset
76 void compare(const RDBRecordset& rec, std::ostream& os) const;
77
78 // Set table name only when retrieval of data has failed and
79 // an empty recordset needs to be returned to the client
80 void setNodeName(const std::string& nodeName);
81
82 private:
83 std::string m_tableName{};
84 std::string m_tagName{};
87};
88
89#endif
Definition of the abstract IRDBRecordset interface.
std::vector< IRDBRecord_ptr > RecordsVector
Definition of RDBVersionAccessor class.
IRDBRecord is one record in the IRDBRecordset object.
Definition IRDBRecord.h:27
IRDBRecordset is an abstract interface to the RDB Recordsets, which represent a snapshot of HVS-tagge...
RecordsVector::const_iterator const_iterator
RDBAccessSvc is the implementation of IRDBAccessSvc interface.
RDBRecordset is an implementation of IRDBRecordset interface.
std::string nodeName() const override
IRDBRecordset::const_iterator end() const override
IRDBRecordset::const_iterator begin() const override
void compare(const RDBRecordset &rec, std::ostream &os) const
bool operator!=(const RDBRecordset &rhs) const
void setNodeName(const std::string &nodeName)
std::string m_tableName
std::string m_tagName
unsigned int size() const override
std::string tagName() const override
const IRDBRecord * operator[](unsigned int index) const override
RDBRecordset(RDBAccessSvc *accessSvc)
Construct empty recordset.
RecordsVector m_records
RDBAccessSvc * m_accessSvc
void getData(coral::ISessionProxy *session, const std::string &nodeName, const std::string &tagName, const std::string &tagId)
Constructs SQL query and retrieves the data from DB.
Definition index.py:1