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

#include "postgres_wsv_query.hpp"

Inheritance diagram for iroha::ametsuchi::PostgresWsvQuery:
Inheritance graph
Collaboration diagram for iroha::ametsuchi::PostgresWsvQuery:
Collaboration graph

Public Member Functions

 PostgresWsvQuery (soci::session &sql, logger::LoggerPtr log)
 
 PostgresWsvQuery (std::unique_ptr< soci::session > sql, logger::LoggerPtr log)
 
boost::optional< std::vector< shared_model::interface::types::PubkeyType > > getSignatories (const shared_model::interface::types::AccountIdType &account_id) override
 
boost::optional< std::vector< std::shared_ptr< shared_model::interface::Peer > > > getPeers () override
 
boost::optional< std::shared_ptr< shared_model::interface::Peer > > getPeerByPublicKey (const shared_model::interface::types::PubkeyType &public_key) override
 
- Public Member Functions inherited from iroha::ametsuchi::WsvQuery
virtual ~WsvQuery ()=default
 

Constructor & Destructor Documentation

◆ PostgresWsvQuery() [1/2]

iroha::ametsuchi::PostgresWsvQuery::PostgresWsvQuery ( soci::session &  sql,
logger::LoggerPtr  log 
)

◆ PostgresWsvQuery() [2/2]

iroha::ametsuchi::PostgresWsvQuery::PostgresWsvQuery ( std::unique_ptr< soci::session >  sql,
logger::LoggerPtr  log 
)

Member Function Documentation

◆ getPeerByPublicKey()

boost::optional< std::shared_ptr< shared_model::interface::Peer > > iroha::ametsuchi::PostgresWsvQuery::getPeerByPublicKey ( const shared_model::interface::types::PubkeyType public_key)
overridevirtual

Fetch peer with given public key from ledger

Returns
the peer if found, none otherwise

Implements iroha::ametsuchi::WsvQuery.

◆ getPeers()

boost::optional< std::vector< std::shared_ptr< shared_model::interface::Peer > > > iroha::ametsuchi::PostgresWsvQuery::getPeers ( )
overridevirtual

Fetch peers stored in ledger

Returns
list of peers in insertion to ledger order

Implements iroha::ametsuchi::WsvQuery.

Here is the caller graph for this function:

◆ getSignatories()

boost::optional< std::vector< PubkeyType > > iroha::ametsuchi::PostgresWsvQuery::getSignatories ( const shared_model::interface::types::AccountIdType account_id)
overridevirtual

Get signatories of account by user account_id

Parameters
account_id
Returns

Implements iroha::ametsuchi::WsvQuery.

Here is the call graph for this function:

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