hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
model_query_builder.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SHARED_MODEL_MODEL_QUERY_BUILDER_HPP
7 #define IROHA_SHARED_MODEL_MODEL_QUERY_BUILDER_HPP
8 
9 #include <boost/optional.hpp>
12 
13 namespace shared_model {
14  namespace bindings {
20  private:
21  template <int Sp>
23  : builder_(o) {}
24 
25  public:
27 
33  ModelQueryBuilder createdTime(
34  interface::types::TimestampType created_time);
35 
41  ModelQueryBuilder creatorAccountId(
42  const interface::types::AccountIdType &creator_account_id);
43 
49  ModelQueryBuilder queryCounter(
50  interface::types::CounterType query_counter);
51 
57  ModelQueryBuilder getAccount(
58  const interface::types::AccountIdType &account_id);
59 
65  ModelQueryBuilder getSignatories(
66  const interface::types::AccountIdType &account_id);
67 
73  ModelQueryBuilder getAccountTransactions(
74  const interface::types::AccountIdType &account_id,
76  const boost::optional<interface::types::HashType> &first_hash =
77  boost::none);
78 
85  ModelQueryBuilder getAccountAssetTransactions(
86  const interface::types::AccountIdType &account_id,
87  const interface::types::AssetIdType &asset_id,
89  const boost::optional<interface::types::HashType> &first_hash =
90  boost::none);
91 
97  ModelQueryBuilder getAccountAssets(
98  const interface::types::AccountIdType &account_id);
99 
104  ModelQueryBuilder getRoles();
105 
111  ModelQueryBuilder getAssetInfo(
112  const interface::types::AssetIdType &asset_id);
113 
119  ModelQueryBuilder getRolePermissions(
120  const interface::types::RoleIdType &role_id);
121 
127  ModelQueryBuilder getTransactions(
128  const std::vector<crypto::Hash> &hashes);
129 
137  ModelQueryBuilder getAccountDetail(
138  const interface::types::AccountIdType &account_id = "",
140  const interface::types::AccountIdType &writer = "");
141 
147  ModelQueryBuilder getPendingTransactions();
148 
154 
155  private:
158  builder_;
159  };
160  } // namespace bindings
161 } // namespace shared_model
162 
163 #endif // IROHA_SHARED_MODEL_MODEL_QUERY_BUILDER_HPP
ModelQueryBuilder getPendingTransactions()
Definition: model_query_builder.cpp:88
ModelQueryBuilder getAccountAssetTransactions(const interface::types::AccountIdType &account_id, const interface::types::AssetIdType &asset_id, interface::types::TransactionsNumberType page_size, const boost::optional< interface::types::HashType > &first_hash=boost::none)
Definition: model_query_builder.cpp:47
ModelQueryBuilder creatorAccountId(const interface::types::AccountIdType &creator_account_id)
Definition: model_query_builder.cpp:19
ModelQueryBuilder getRolePermissions(const interface::types::RoleIdType &role_id)
Definition: model_query_builder.cpp:70
ModelQueryBuilder getSignatories(const interface::types::AccountIdType &account_id)
Definition: model_query_builder.cpp:34
Definition: model_query_builder.hpp:19
ModelQueryBuilder getRoles()
Definition: model_query_builder.cpp:61
proto::UnsignedWrapper< proto::Query > build()
Definition: model_query_builder.cpp:92
ModelQueryBuilder()
Definition: model_query_builder.cpp:10
ModelQueryBuilder getAccountAssets(const interface::types::AccountIdType &account_id)
Definition: model_query_builder.cpp:56
std::string AccountDetailKeyType
Type of account detail key.
Definition: types.hpp:75
ModelQueryBuilder getAssetInfo(const interface::types::AssetIdType &asset_id)
Definition: model_query_builder.cpp:65
ModelQueryBuilder getAccount(const interface::types::AccountIdType &account_id)
Definition: model_query_builder.cpp:29
std::string AccountIdType
Type of account id.
Definition: types.hpp:37
ModelQueryBuilder getAccountTransactions(const interface::types::AccountIdType &account_id, interface::types::TransactionsNumberType page_size, const boost::optional< interface::types::HashType > &first_hash=boost::none)
Definition: model_query_builder.cpp:39
ModelQueryBuilder getAccountDetail(const interface::types::AccountIdType &account_id="", const interface::types::AccountDetailKeyType &key="", const interface::types::AccountIdType &writer="")
Definition: model_query_builder.cpp:80
Definition: unsigned_proto.hpp:25
ModelQueryBuilder queryCounter(interface::types::CounterType query_counter)
Definition: model_query_builder.cpp:24
uint16_t TransactionsNumberType
Type of a number of transactions in block and query response page.
Definition: types.hpp:79
ModelQueryBuilder getTransactions(const std::vector< crypto::Hash > &hashes)
Definition: model_query_builder.cpp:75
uint64_t CounterType
Type of counter.
Definition: types.hpp:65
ModelQueryBuilder createdTime(interface::types::TimestampType created_time)
Definition: model_query_builder.cpp:14
Definition: command_executor.hpp:12
Definition: query_template.hpp:33
std::string RoleIdType
Type of role (i.e admin, user)
Definition: types.hpp:49
uint64_t TimestampType
Type of timestamp.
Definition: types.hpp:61
std::string AssetIdType
Type of asset id.
Definition: types.hpp:53