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>
10 
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  virtual std::optional<types::TimestampType> firstTxTime() const = 0;
28  virtual std::optional<types::TimestampType> lastTxTime() const = 0;
29  virtual std::optional<types::HeightType> firstTxHeight() const = 0;
30  virtual std::optional<types::HeightType> lastTxHeight() const = 0;
31  std::string toString() const override;
32 
33  bool operator==(const ModelType &rhs) const override;
34  };
35 
36  } // namespace interface
37 } // namespace shared_model
38 
39 #endif // IROHA_SHARED_INTERFACE_MODEL_QUERY_TX_PAGINATION_META_HPP
Definition: ordering.hpp:19
virtual std::optional< types::TimestampType > lastTxTime() const =0
TxPaginationMeta ModelType
Definition: model_primitive.hpp:27
virtual std::optional< types::HeightType > firstTxHeight() const =0
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:86
Definition: model_primitive.hpp:22
virtual std::optional< types::HeightType > lastTxHeight() const =0
Definition: command_executor.hpp:13
virtual std::optional< types::TimestampType > firstTxTime() const =0
virtual Ordering const & ordering() const =0