hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
query_executor.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_QUERY_EXECUTOR_HPP
7 #define IROHA_QUERY_EXECUTOR_HPP
8 
9 #include <memory>
10 
11 namespace shared_model {
12  namespace interface {
13  class Query;
14  class BlocksQuery;
15  class QueryResponse;
16  } // namespace interface
17 } // namespace shared_model
18 
19 namespace iroha {
20  namespace ametsuchi {
21 
22  using QueryExecutorResult =
23  std::unique_ptr<shared_model::interface::QueryResponse>;
24 
25  class QueryExecutor {
26  public:
27  virtual ~QueryExecutor() = default;
34  virtual QueryExecutorResult validateAndExecute(
35  const shared_model::interface::Query &query,
36  const bool validate_signatories) = 0;
37 
44  virtual bool validate(const shared_model::interface::BlocksQuery &query,
45  const bool validate_signatories) = 0;
46  };
47  } // namespace ametsuchi
48 } // namespace iroha
49 
50 #endif // IROHA_QUERY_EXECUTOR_HPP
Definition: query.hpp:34
Definition: blocks_query.hpp:20
Definition: block_query.hpp:16
Definition: query_executor.hpp:25
std::unique_ptr< shared_model::interface::QueryResponse > QueryExecutorResult
Definition: query_executor.hpp:23
Definition: command_executor.hpp:12