hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
tx_pagination_meta.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SHARED_INTERFACE_MODEL_QUERY_TX_PAGINATION_META_HPP
7 #define IROHA_SHARED_INTERFACE_MODEL_QUERY_TX_PAGINATION_META_HPP
8 
9 #include <optional>
12 
13 #include "ordering.hpp"
14 
15 namespace shared_model {
16  namespace interface {
17 
19  class TxPaginationMeta : public ModelPrimitive<TxPaginationMeta> {
20  public:
22  virtual types::TransactionsNumberType pageSize() const = 0;
23 
25  virtual std::optional<types::HashType> firstTxHash() const = 0;
26  virtual Ordering const &ordering() const = 0;
27 
28  std::string toString() const override;
29 
30  bool operator==(const ModelType &rhs) const override;
31  };
32 
33  } // namespace interface
34 } // namespace shared_model
35 
36 #endif // IROHA_SHARED_INTERFACE_MODEL_QUERY_TX_PAGINATION_META_HPP
Definition: ordering.hpp:19
TxPaginationMeta ModelType
Definition: model_primitive.hpp:27
virtual types::TransactionsNumberType pageSize() const =0
Get the requested page size.
bool operator==(const ModelType &rhs) const override
Definition: tx_pagination_meta.cpp:12
virtual std::optional< types::HashType > firstTxHash() const =0
Get the first requested transaction hash, if provided.
Provides query metadata for any transaction list pagination.
Definition: tx_pagination_meta.hpp:19
std::string toString() const override
Definition: tx_pagination_meta.cpp:16
uint16_t TransactionsNumberType
Type of a number of transactions in block and query response page.
Definition: types.hpp:84
Definition: model_primitive.hpp:22
Definition: command_executor.hpp:12
virtual Ordering const & ordering() const =0