hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
postgres_query_executor.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_POSTGRES_QUERY_EXECUTOR_HPP
7 #define IROHA_POSTGRES_QUERY_EXECUTOR_HPP
8 
10 
11 #include <soci/soci.h>
12 #include "logger/logger_fwd.hpp"
13 
14 namespace shared_model {
15  namespace interface {
16  class QueryResponseFactory;
17  } // namespace interface
18 } // namespace shared_model
19 
20 namespace iroha::ametsuchi {
21 
22  class SpecificQueryExecutor;
23 
25  public:
27  std::unique_ptr<soci::session> sql,
28  std::shared_ptr<shared_model::interface::QueryResponseFactory>
29  response_factory,
30  std::shared_ptr<SpecificQueryExecutor> specific_query_executor,
31  logger::LoggerPtr log);
32 
33  bool validateSignatures(
34  const shared_model::interface::Query &query) override;
35  bool validateSignatures(
36  const shared_model::interface::BlocksQuery &query) override;
37 
38  private:
39  template <class Q>
40  bool validateSignaturesImpl(const Q &query);
41  std::unique_ptr<soci::session> sql_;
42  };
43 
44 } // namespace iroha::ametsuchi
45 
46 #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
Definition: command_executor.hpp:13
Definition: postgres_query_executor.hpp:24