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

#include "postgres_block_query.hpp"

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

Public Member Functions

 PostgresBlockQuery (soci::session &sql, BlockStorage &block_storage, logger::LoggerPtr log)
 
 PostgresBlockQuery (std::unique_ptr< soci::session > sql, BlockStorage &block_storage, logger::LoggerPtr log)
 
std::optional< int32_t > getTxStatus (const shared_model::crypto::Hash &hash) override
 
- Public Member Functions inherited from iroha::ametsuchi::BlockQueryBase
 BlockQueryBase (BlockStorage &block_storage, logger::LoggerPtr log)
 
BlockResult getBlock (shared_model::interface::types::HeightType height) override
 
shared_model::interface::types::HeightType getTopBlockHeight () override
 
void reloadBlockstore () override
 
std::optional< TxCacheStatusTypecheckTxPresence (const shared_model::crypto::Hash &hash) override
 
- Public Member Functions inherited from iroha::ametsuchi::BlockQuery
virtual ~BlockQuery ()=default
 

Additional Inherited Members

- Public Types inherited from iroha::ametsuchi::BlockQuery
using BlockResult = expected::Result< std::unique_ptr< shared_model::interface::Block >, GetBlockError >
 
- Protected Attributes inherited from iroha::ametsuchi::BlockQueryBase
BlockStorageblock_storage_
 
logger::LoggerPtr log_
 

Detailed Description

Class which implements BlockQuery with a Postgres backend.

Constructor & Destructor Documentation

◆ PostgresBlockQuery() [1/2]

iroha::ametsuchi::PostgresBlockQuery::PostgresBlockQuery ( soci::session &  sql,
BlockStorage block_storage,
logger::LoggerPtr  log 
)

◆ PostgresBlockQuery() [2/2]

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

Member Function Documentation

◆ getTxStatus()

std::optional< int32_t > iroha::ametsuchi::PostgresBlockQuery::getTxStatus ( const shared_model::crypto::Hash hash)
overridevirtual

Implements iroha::ametsuchi::BlockQueryBase.

Here is the call graph for this function:

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