hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
iroha::ametsuchi::PostgresOptions Class Reference

#include "postgres_options.hpp"

Collaboration diagram for iroha::ametsuchi::PostgresOptions:
Collaboration graph

Public Member Functions

 PostgresOptions (const std::string &pg_opt, std::string default_dbname, logger::LoggerPtr log)
 
 PostgresOptions (const std::string &host, uint16_t port, const std::string &user, const std::string &password, const std::string &working_dbname, const std::string &maintenance_dbname, logger::LoggerPtr log)
 
std::string connectionStringWithoutDbName () const
 
std::string workingConnectionString () const
 
std::string maintenanceConnectionString () const
 
std::string workingDbName () const
 
std::string maintenanceDbName () const
 
const std::string & preparedBlockName () const
 

Detailed Description

Type for convenient formatting of PostgreSQL connection strings.

Constructor & Destructor Documentation

PostgresOptions::PostgresOptions ( const std::string &  pg_opt,
std::string  default_dbname,
logger::LoggerPtr  log 
)
Parameters
pg_optThe connection options string.
default_dbnameThe default name of database to use when one is not provided in pg_opt.
logLogger for internal messages.

TODO 2019.06.07 mboldyrev IR-556 remove this constructor

PostgresOptions::PostgresOptions ( const std::string &  host,
uint16_t  port,
const std::string &  user,
const std::string &  password,
const std::string &  working_dbname,
const std::string &  maintenance_dbname,
logger::LoggerPtr  log 
)
Parameters
hostPostgreSQL host.
portPostgreSQL port.
userPostgreSQL username.
passwordPostgreSQL password.
working_dbnameThe name of working database.
maintenance_dbnameThe name of database for maintenance purposes. It will not be altered in any way and is used to manage working database.
logLogger for internal messages.

Member Function Documentation

std::string PostgresOptions::connectionStringWithoutDbName ( ) const
Returns
connection string without dbname param

Here is the caller graph for this function:

std::string PostgresOptions::maintenanceConnectionString ( ) const
Returns
connection string to maintenance database

Here is the call graph for this function:

Here is the caller graph for this function:

std::string PostgresOptions::maintenanceDbName ( ) const
Returns
maintenance database name
const std::string & PostgresOptions::preparedBlockName ( ) const
Returns
prepared block name

Here is the caller graph for this function:

std::string PostgresOptions::workingConnectionString ( ) const
Returns
connection string to working database

Here is the caller graph for this function:

std::string PostgresOptions::workingDbName ( ) const
Returns
working database name

Here is the caller graph for this function:


The documentation for this class was generated from the following files: