hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
postgres_options.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_POSTGRES_OPTIONS_HPP
7 #define IROHA_POSTGRES_OPTIONS_HPP
8 
9 #include <boost/optional.hpp>
10 #include <unordered_map>
11 #include "common/result.hpp"
12 
13 namespace iroha {
14  namespace ametsuchi {
15 
21  public:
22 
26  PostgresOptions() = delete;
27 
31  std::string optionsString() const;
32 
36  std::string optionsStringWithoutDbName() const;
37 
38  boost::optional<std::string> dbname() const;
39 
40  explicit PostgresOptions(const std::string &pg_opt);
41 
42  private:
43  const std::string pg_opt_;
44  std::string pg_opt_without_db_name_;
45  boost::optional<std::string> dbname_;
46  };
47 
48  } // namespace ametsuchi
49 } // namespace iroha
50 
51 #endif // IROHA_POSTGRES_OPTIONS_HPP
Definition: postgres_options.hpp:20
std::string optionsString() const
Definition: postgres_options.cpp:44
std::string optionsStringWithoutDbName() const
Definition: postgres_options.cpp:48
Definition: block_query.hpp:16
boost::optional< std::string > dbname() const
Definition: postgres_options.cpp:52