hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
query_processor_impl.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_QUERY_PROCESSOR_IMPL_HPP
7 #define IROHA_QUERY_PROCESSOR_IMPL_HPP
8 
10 
11 #include "ametsuchi/storage.hpp"
13 #include "logger/logger_fwd.hpp"
14 
15 namespace iroha {
16  namespace torii {
17 
22  public:
24  std::shared_ptr<ametsuchi::Storage> storage,
25  std::shared_ptr<ametsuchi::QueryExecutorFactory> qry_exec,
26  std::shared_ptr<iroha::PendingTransactionStorage>
27  pending_transactions,
28  std::shared_ptr<shared_model::interface::QueryResponseFactory>
29  response_factory,
30  logger::LoggerPtr log);
31 
33  std::unique_ptr<shared_model::interface::QueryResponse>,
34  std::string>
35  queryHandle(const shared_model::interface::Query &qry) override;
36 
38  const shared_model::interface::BlocksQuery &qry) override;
39 
40  private:
41  std::shared_ptr<ametsuchi::Storage> storage_;
42  std::shared_ptr<ametsuchi::QueryExecutorFactory> qry_exec_;
43  std::shared_ptr<iroha::PendingTransactionStorage> pending_transactions_;
44  std::shared_ptr<shared_model::interface::QueryResponseFactory>
45  response_factory_;
46 
47  logger::LoggerPtr log_;
48  };
49 
50  } // namespace torii
51 } // namespace iroha
52 
53 #endif // IROHA_QUERY_PROCESSOR_IMPL_HPP
Definition: command_client.hpp:16
Definition: query.hpp:36
Definition: query_processor_impl.hpp:21
Definition: blocks_query.hpp:20
Definition: result_fwd.hpp:27
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
Definition: block_query.hpp:15
iroha::expected::Result< std::unique_ptr< shared_model::interface::QueryResponse >, std::string > queryHandle(const shared_model::interface::Query &qry) override
Definition: query_processor_impl.cpp:36
QueryProcessorImpl(std::shared_ptr< ametsuchi::Storage > storage, std::shared_ptr< ametsuchi::QueryExecutorFactory > qry_exec, std::shared_ptr< iroha::PendingTransactionStorage > pending_transactions, std::shared_ptr< shared_model::interface::QueryResponseFactory > response_factory, logger::LoggerPtr log)
Definition: query_processor_impl.cpp:20
iroha::expected::Result< void, std::string > blocksQueryHandle(const shared_model::interface::BlocksQuery &qry) override
Definition: query_processor_impl.cpp:45
Definition: query_processor.hpp:28