hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
proto_tx_pagination_meta.hpp
Go to the documentation of this file.
1 
7 #ifndef IROHA_SHARED_PROTO_MODEL_QUERY_TX_PAGINATION_META_HPP
8 #define IROHA_SHARED_PROTO_MODEL_QUERY_TX_PAGINATION_META_HPP
9 
12 #include "proto_ordering.hpp"
13 #include "queries.pb.h"
14 
15 namespace shared_model {
16  namespace proto {
17 
20  public:
21  explicit TxPaginationMeta(iroha::protocol::TxPaginationMeta &meta);
22 
24  std::optional<interface::types::HashType> firstTxHash() const override;
25  interface::Ordering const &ordering() const override;
26  std::optional<interface::types::TimestampType> firstTxTime()
27  const override;
28  std::optional<interface::types::TimestampType> lastTxTime()
29  const override;
30  std::optional<interface::types::HeightType> firstTxHeight()
31  const override;
32  std::optional<interface::types::HeightType> lastTxHeight()
33  const override;
34  private:
35  const iroha::protocol::TxPaginationMeta &meta_;
36  OrderingImpl ordering_;
37  };
38  } // namespace proto
39 } // namespace shared_model
40 
41 #endif // IROHA_SHARED_PROTO_MODEL_QUERY_TX_PAGINATION_META_HPP
Definition: ordering.hpp:19
interface::Ordering const & ordering() const override
Definition: proto_tx_pagination_meta.cpp:36
Provides ordering data for pagination.
Definition: proto_ordering.hpp:18
std::optional< interface::types::TimestampType > firstTxTime() const override
Definition: proto_tx_pagination_meta.cpp:40
std::optional< interface::types::HashType > firstTxHash() const override
Get the first requested transaction hash, if provided.
Definition: proto_tx_pagination_meta.cpp:28
std::optional< interface::types::HeightType > lastTxHeight() const override
Definition: proto_tx_pagination_meta.cpp:69
std::optional< interface::types::TimestampType > lastTxTime() const override
Definition: proto_tx_pagination_meta.cpp:50
Provides query metadata for any transaction list pagination.
Definition: tx_pagination_meta.hpp:19
Provides query metadata for any transaction list pagination.
Definition: proto_tx_pagination_meta.hpp:19
uint16_t TransactionsNumberType
Type of a number of transactions in block and query response page.
Definition: types.hpp:86
Definition: command_executor.hpp:13
TxPaginationMeta(iroha::protocol::TxPaginationMeta &meta)
Definition: proto_tx_pagination_meta.cpp:17
interface::types::TransactionsNumberType pageSize() const override
Get the requested page size.
Definition: proto_tx_pagination_meta.cpp:24
std::optional< interface::types::HeightType > firstTxHeight() const override
Definition: proto_tx_pagination_meta.cpp:60