hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
query_executor_base.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_QUERY_EXECUTOR_BASE_HPP
7 #define IROHA_QUERY_EXECUTOR_BASE_HPP
8 
10 
11 #include "logger/logger_fwd.hpp"
12 
13 namespace shared_model {
14  namespace interface {
15  class QueryResponseFactory;
16  } // namespace interface
17 } // namespace shared_model
18 
19 namespace iroha::ametsuchi {
20 
21  class SpecificQueryExecutor;
22 
24  public:
26  std::shared_ptr<shared_model::interface::QueryResponseFactory>
27  response_factory,
28  std::shared_ptr<SpecificQueryExecutor> specific_query_executor,
29  logger::LoggerPtr log);
30 
31  QueryExecutorResult validateAndExecute(
32  const shared_model::interface::Query &query,
33  const bool validate_signatories) override;
34 
35  bool validate(const shared_model::interface::BlocksQuery &query,
36  const bool validate_signatories) override;
37 
38  virtual bool validateSignatures(
39  const shared_model::interface::Query &query) = 0;
40  virtual bool validateSignatures(
41  const shared_model::interface::BlocksQuery &query) = 0;
42 
43  protected:
44  std::shared_ptr<SpecificQueryExecutor> specific_query_executor_;
45  std::shared_ptr<shared_model::interface::QueryResponseFactory>
48  };
49 
50 } // namespace iroha::ametsuchi
51 
52 #endif // IROHA_POSTGRES_QUERY_EXECUTOR_HPP
Definition: block_query.hpp:17
Definition: query.hpp:36
Definition: blocks_query.hpp:20
Definition: query_executor_base.hpp:23
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
logger::LoggerPtr log_
Definition: query_executor_base.hpp:47
std::unique_ptr< shared_model::interface::QueryResponse > QueryExecutorResult
Definition: query_executor.hpp:23
std::shared_ptr< shared_model::interface::QueryResponseFactory > query_response_factory_
Definition: query_executor_base.hpp:46
Definition: query_executor.hpp:25
std::shared_ptr< SpecificQueryExecutor > specific_query_executor_
Definition: query_executor_base.hpp:44
Definition: command_executor.hpp:13