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

#include "pg_connection_init.hpp"

Collaboration diagram for iroha::ametsuchi::PgConnectionInit:
Collaboration graph

Static Public Member Functions

static expected::Result< std::shared_ptr< soci::connection_pool >, std::string > initPostgresConnection (std::string &options_str, size_t pool_size)
 
static expected::Result< std::shared_ptr< PoolWrapper >, std::string > prepareConnectionPool (const ReconnectionStrategyFactory &reconnection_strategy_factory, const PostgresOptions &options, const int pool_size, logger::LoggerManagerTreePtr log_manager)
 
static bool preparedTransactionsAvailable (soci::session &sql)
 
static iroha::expected::Result< void, std::string > rollbackPrepared (soci::session &sql, const std::string &prepared_block_name)
 
static expected::Result< bool, std::string > checkIfWorkingDatabaseExists (const PostgresOptions &pg_opt)
 
static expected::Result< bool, std::string > createDatabaseIfNotExist (const PostgresOptions &pg_opt)
 
static expected::Result< void, std::string > resetWsv (soci::session &sql)
 
static expected::Result< void, std::string > dropWorkingDatabase (const PostgresOptions &options)
 
static expected::Result< void, std::string > resetPeers (soci::session &sql)
 
static void prepareTables (soci::session &session)
 Create tables in the given session. Left public for tests. More...
 

Member Function Documentation

iroha::expected::Result< bool, std::string > PgConnectionInit::checkIfWorkingDatabaseExists ( const PostgresOptions pg_opt)
static

Here is the call graph for this function:

Here is the caller graph for this function:

iroha::expected::Result< bool, std::string > PgConnectionInit::createDatabaseIfNotExist ( const PostgresOptions pg_opt)
static

Here is the call graph for this function:

iroha::expected::Result< void, std::string > PgConnectionInit::dropWorkingDatabase ( const PostgresOptions options)
static

Here is the call graph for this function:

Here is the caller graph for this function:

iroha::expected::Result< std::shared_ptr< soci::connection_pool >, std::string > PgConnectionInit::initPostgresConnection ( std::string &  options_str,
size_t  pool_size 
)
static

Here is the caller graph for this function:

iroha::expected::Result< std::shared_ptr< PoolWrapper >, std::string > PgConnectionInit::prepareConnectionPool ( const ReconnectionStrategyFactory reconnection_strategy_factory,
const PostgresOptions options,
const int  pool_size,
logger::LoggerManagerTreePtr  log_manager 
)
static

Here is the call graph for this function:

bool PgConnectionInit::preparedTransactionsAvailable ( soci::session &  sql)
static

Verify whether postgres supports prepared transactions

Here is the caller graph for this function:

void PgConnectionInit::prepareTables ( soci::session &  session)
static

Create tables in the given session. Left public for tests.

Here is the call graph for this function:

Here is the caller graph for this function:

iroha::expected::Result< void, std::string > PgConnectionInit::resetPeers ( soci::session &  sql)
static

Removes all peers from WSV

Returns
error message if reset has failed

Here is the caller graph for this function:

iroha::expected::Result< void, std::string > PgConnectionInit::resetWsv ( soci::session &  sql)
static

Here is the caller graph for this function:

iroha::expected::Result< void, std::string > PgConnectionInit::rollbackPrepared ( soci::session &  sql,
const std::string &  prepared_block_name 
)
static

Here is the caller graph for this function:


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