hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
postgres_setting_query.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_POSTGRES_SETTING_QUERY_HPP
7 #define IROHA_POSTGRES_SETTING_QUERY_HPP
8 
10 
11 #include <soci/soci.h>
12 #include <boost/optional.hpp>
13 #include "logger/logger_fwd.hpp"
14 
15 namespace iroha {
16  namespace ametsuchi {
17 
22  public:
23  PostgresSettingQuery(std::unique_ptr<soci::session> sql,
24  logger::LoggerPtr log);
25 
26  expected::Result<
27  std::unique_ptr<const shared_model::validation::Settings>,
28  std::string>
29  get() override;
30 
31  private:
32  expected::Result<
33  std::unique_ptr<const shared_model::validation::Settings>,
34  std::string>
35  update(std::unique_ptr<shared_model::validation::Settings> base);
36 
37  std::unique_ptr<soci::session> psql_;
38  soci::session &sql_;
39 
40  logger::LoggerPtr log_;
41  };
42 
45  } // namespace ametsuchi
46 } // namespace iroha
47 
48 #endif // IROHA_POSTGRES_SETTING_QUERY_HPP
Definition: setting_query.hpp:19
std::string SettingKeyType
Type of setting key.
Definition: types.hpp:85
PostgresSettingQuery(std::unique_ptr< soci::session > sql, logger::LoggerPtr log)
Definition: postgres_setting_query.cpp:32
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
const shared_model::interface::types::SettingKeyType kMaxDescriptionSizeKey
Definition: postgres_setting_query.cpp:68
Definition: block_query.hpp:14
Definition: postgres_setting_query.hpp:21