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

#include "postgres_indexer.hpp"

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

Public Member Functions

 PostgresIndexer (soci::session &sql)
 
void committedTxHash (const TxPosition &position, shared_model::interface::types::TimestampType const ts, const shared_model::interface::types::HashType &committed_tx_hash) override
 Store a committed tx hash. More...
 
void rejectedTxHash (const TxPosition &position, shared_model::interface::types::TimestampType const ts, const shared_model::interface::types::HashType &rejected_tx_hash) override
 Store a rejected tx hash. More...
 
void txPositions (shared_model::interface::types::AccountIdType const &account, shared_model::interface::types::HashType const &hash, boost::optional< shared_model::interface::types::AssetIdType > &&asset_id, shared_model::interface::types::TimestampType const ts, TxPosition const &position) override
 Index tx info. More...
 
iroha::expected::Result< void, std::string > flush () override
 
- Public Member Functions inherited from iroha::ametsuchi::Indexer
virtual ~Indexer ()=default
 

Constructor & Destructor Documentation

◆ PostgresIndexer()

PostgresIndexer::PostgresIndexer ( soci::session &  sql)
Here is the call graph for this function:

Member Function Documentation

◆ committedTxHash()

void PostgresIndexer::committedTxHash ( const TxPosition position,
shared_model::interface::types::TimestampType const  ts,
const shared_model::interface::types::HashType committed_tx_hash 
)
overridevirtual

Store a committed tx hash.

Implements iroha::ametsuchi::Indexer.

◆ flush()

iroha::expected::Result< void, std::string > PostgresIndexer::flush ( )
overridevirtual

Flush the indices to storage. Makes the effects of new indices (that were created before this call) visible to other components. Discards indexer inner state on success.

Returns
Void Value on success, string Error on failure.

Implements iroha::ametsuchi::Indexer.

◆ rejectedTxHash()

void PostgresIndexer::rejectedTxHash ( const TxPosition position,
shared_model::interface::types::TimestampType const  ts,
const shared_model::interface::types::HashType rejected_tx_hash 
)
overridevirtual

Store a rejected tx hash.

Implements iroha::ametsuchi::Indexer.

◆ txPositions()

void PostgresIndexer::txPositions ( shared_model::interface::types::AccountIdType const &  creator,
shared_model::interface::types::HashType const &  hash,
boost::optional< shared_model::interface::types::AssetIdType > &&  asset_id,
shared_model::interface::types::TimestampType const  ts,
TxPosition const &  position 
)
overridevirtual

Index tx info.

Implements iroha::ametsuchi::Indexer.

Here is the call graph for this function:

Member Data Documentation

◆ account

std::vector<shared_model::interface::types::AccountIdType> iroha::ametsuchi::PostgresIndexer::account

◆ asset_id

std::vector< boost::optional<shared_model::interface::types::AssetIdType> > iroha::ametsuchi::PostgresIndexer::asset_id

◆ hash

std::vector<std::string> iroha::ametsuchi::PostgresIndexer::hash

◆ height

std::vector<size_t> iroha::ametsuchi::PostgresIndexer::height

◆ index

std::vector<size_t> iroha::ametsuchi::PostgresIndexer::index

◆ status

std::vector<std::string> iroha::ametsuchi::PostgresIndexer::status

◆ ts

std::vector<shared_model::interface::types::TimestampType> iroha::ametsuchi::PostgresIndexer::ts

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