#include "postgres_block_storage.hpp"


Public Types | |
| using | BlockTransportFactory = shared_model::proto::ProtoBlockFactory |
Public Types inherited from iroha::ametsuchi::BlockStorage | |
| using | FunctionType = std::function< expected::Result< void, std::string >(std::shared_ptr< const shared_model::interface::Block >)> |
| type of function which can be applied to the elements of the storage More... | |
Public Member Functions | |
| ~PostgresBlockStorage () override | |
| bool | insert (std::shared_ptr< const shared_model::interface::Block > block) override |
| boost::optional< std::unique_ptr< shared_model::interface::Block > > | fetch (shared_model::interface::types::HeightType height) const override |
| size_t | size () const override |
| void | reload () override |
| void | clear () override |
| expected::Result< void, std::string > | forEach (FunctionType function) const override |
Public Member Functions inherited from iroha::ametsuchi::BlockStorage | |
| virtual | ~BlockStorage ()=default |
Static Public Member Functions | |
| static iroha::expected::Result< std::unique_ptr< PostgresBlockStorage >, std::string > | create (std::shared_ptr< PoolWrapper > pool_wrapper, std::shared_ptr< BlockTransportFactory > block_factory, std::string table_name, bool drop_table_at_destruction, logger::LoggerPtr log) |
| using iroha::ametsuchi::PostgresBlockStorage::BlockTransportFactory = shared_model::proto::ProtoBlockFactory |
|
override |
|
overridevirtual |
Clears the contents of storage
Implements iroha::ametsuchi::BlockStorage.
|
static |

|
overridevirtual |
Get block with given height
Implements iroha::ametsuchi::BlockStorage.


|
overridevirtual |
Iterates through all the stored blocks
Implements iroha::ametsuchi::BlockStorage.

|
overridevirtual |
Append block, if the storage doesn't already contain the same block
Implements iroha::ametsuchi::BlockStorage.
|
overridevirtual |
Reloads blocks in case their were modified externally
Implements iroha::ametsuchi::BlockStorage.
|
overridevirtual |
Returns the size of the storage
Implements iroha::ametsuchi::BlockStorage.