ATLAS Offline Software
RDBQuery.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef RDBACCESSSVC_RDBQUERY_H
6 #define RDBACCESSSVC_RDBQUERY_H
7 
9 #include "DBLock/DBLock.h"
10 #include <memory>
11 #include <vector>
12 #include <string>
13 
14 namespace coral
15 {
16  class IQuery;
17  class ICursor;
18 }
19 
27 class RDBAccessSvc;
28 
29 class RDBQuery final : public IRDBQuery
30 {
31  public:
32  RDBQuery(const Athena::DBLock& dblock
33  , RDBAccessSvc* accessSvc
34  , const std::string& nodeName
35  , const std::string& tagId
36  , const std::string& connName);
37 
38  virtual ~RDBQuery() override;
39 
40  virtual void execute() override;
41  virtual long size() override;
42  virtual void finalize() override;
43  virtual void setOrder(const std::string&) override;
44  virtual void addToOutput(const std::string&) override;
45 
46  virtual bool next() override;
47 
48  private:
49  RDBQuery() = delete;
50 
52  coral::IQuery* m_query;
53  coral::IQuery* m_queryCount;
55  std::string m_nodeName;
56  std::string m_tagId;
57  std::string m_connName;
58  long m_size;
59  std::vector<std::string> m_fields;
60  coral::ICursor* m_cursor;
61  std::string m_orderField;
62  bool m_executed;
63 };
64 
65 #endif
RDBQuery
RDBQuery is an implementation of IRDBQuery interface.
Definition: RDBQuery.h:30
RDBQuery::m_orderField
std::string m_orderField
Definition: RDBQuery.h:61
RDBQuery::~RDBQuery
virtual ~RDBQuery() override
Definition: RDBQuery.cxx:43
RDBQuery::m_tagId
std::string m_tagId
Definition: RDBQuery.h:56
RDBQuery::addToOutput
virtual void addToOutput(const std::string &) override
Definition: RDBQuery.cxx:171
RDBQuery::m_size
long m_size
Definition: RDBQuery.h:58
RDBQuery::m_fields
std::vector< std::string > m_fields
Definition: RDBQuery.h:59
IRDBQuery.h
RDBQuery::m_executed
bool m_executed
Definition: RDBQuery.h:62
coral
Definition: ISecondaryEventSelector.h:19
RDBQuery::next
virtual bool next() override
Definition: RDBQuery.cxx:176
RDBQuery::m_connName
std::string m_connName
Definition: RDBQuery.h:57
RDBQuery::RDBQuery
RDBQuery()=delete
RDBQuery::m_accessSvc
RDBAccessSvc * m_accessSvc
Definition: RDBQuery.h:54
RDBAccessSvc
RDBAccessSvc is the implementation of IRDBAccessSvc interface.
Definition: RDBAccessSvc.h:58
Athena::DBLock
Common database lock.
Definition: DBLock.h:46
IRDBQuery
Definition: IRDBQuery.h:13
RDBQuery::m_nodeName
std::string m_nodeName
Definition: RDBQuery.h:55
RDBQuery::finalize
virtual void finalize() override
Definition: RDBQuery.cxx:160
RDBQuery::size
virtual long size() override
Definition: RDBQuery.cxx:155
RDBQuery::m_cursor
coral::ICursor * m_cursor
Definition: RDBQuery.h:60
RDBQuery::m_queryCount
coral::IQuery * m_queryCount
Definition: RDBQuery.h:53
RDBQuery::m_dblock
Athena::DBLock m_dblock
Definition: RDBQuery.h:51
DBLock.h
Common database lock.
RDBQuery::execute
virtual void execute() override
Definition: RDBQuery.cxx:49
RDBQuery::setOrder
virtual void setOrder(const std::string &) override
Definition: RDBQuery.cxx:166
RDBQuery::m_query
coral::IQuery * m_query
Definition: RDBQuery.h:52