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 <unordered_map>
10 #include "common/result.hpp"
11 #include "logger/logger_fwd.hpp"
12 
13 namespace iroha {
14  namespace ametsuchi {
15 
21  public:
31  PostgresOptions(const std::string &pg_opt,
32  std::string default_dbname,
33  logger::LoggerPtr log);
34 
38  std::string optionsString() const;
39 
43  std::string optionsStringWithoutDbName() const;
44 
45  const std::string &dbname() const;
46 
47  private:
48  const std::string pg_opt_;
49  std::string pg_opt_without_db_name_;
50  std::string dbname_;
51  };
52 
53  } // namespace ametsuchi
54 } // namespace iroha
55 
56 #endif // IROHA_POSTGRES_OPTIONS_HPP
Definition: postgres_options.hpp:20
std::string optionsString() const
Definition: postgres_options.cpp:51
std::string optionsStringWithoutDbName() const
Definition: postgres_options.cpp:55
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
Definition: block_query.hpp:14
const std::string & dbname() const
Definition: postgres_options.cpp:59
PostgresOptions(const std::string &pg_opt, std::string default_dbname, logger::LoggerPtr log)
Definition: postgres_options.cpp:20