-
Notifications
You must be signed in to change notification settings - Fork 297
GetAccountTransactions Pagination #1903
GetAccountTransactions Pagination #1903
Conversation
Signed-off-by: Nikita Alekseev <n.alekseev2104@gmail.com>
Signed-off-by: Nikita Alekseev <n.alekseev2104@gmail.com>
Signed-off-by: Nikita Alekseev <n.alekseev2104@gmail.com>
Signed-off-by: Nikita Alekseev <n.alekseev2104@gmail.com>
Signed-off-by: Nikita Alekseev <n.alekseev2104@gmail.com>
Signed-off-by: Nikita Alekseev <n.alekseev2104@gmail.com>
Signed-off-by: Nikita Alekseev <n.alekseev2104@gmail.com>
Signed-off-by: Nikita Alekseev <n.alekseev2104@gmail.com>
Signed-off-by: Nikita Alekseev <n.alekseev2104@gmail.com>
Signed-off-by: Nikita Alekseev <n.alekseev2104@gmail.com>
Signed-off-by: Nikita Alekseev <n.alekseev2104@gmail.com>
…rledger/iroha into feature/get_transactions_pagination
Signed-off-by: Nikita Alekseev <n.alekseev2104@gmail.com>
Signed-off-by: Nikita Alekseev <n.alekseev2104@gmail.com>
Signed-off-by: Nikita Alekseev <n.alekseev2104@gmail.com>
b1b287a
to
81a1fd4
Compare
Signed-off-by: Nikita Alekseev <n.alekseev2104@gmail.com>
@@ -606,9 +606,10 @@ CREATE TABLE IF NOT EXISTS account_has_grantable_permissions ( | |||
+ R"() NOT NULL, | |||
PRIMARY KEY (permittee_account_id, account_id) | |||
); | |||
CREATE TABLE IF NOT EXISTS height_by_hash ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still have that table in ametsuchi fixture. Replace it there as well
using PermissionTuple = boost::tuple<int>; | ||
|
||
auto cmd = (boost::format(R"(WITH has_perms AS (%s), | ||
auto &pagination_info = q.paginationMeta(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If paginationMeta()
returns constref, it should be const auto &pagination_info
|
||
return query_response_factory_->createTransactionsResponse( | ||
std::move(response_txs), query_hash_); | ||
// next transaction exists |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not very clear comment, please expand it a little
framework::SpecifiedVisitor< | ||
shared_model::interface::AccountResponse>(), | ||
result->get()); | ||
const auto &cast_resp = getRef<AccountResponse>(result->get()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, cancel changes in existing tests, as there will be a significant amount of conflicts with this PR when merging
5dbe520
to
a14daa4
Compare
Signed-off-by: Nikita Alekseev <n.alekseev2104@gmail.com>
a14daa4
to
1f17fdd
Compare
…rledger/iroha into feature/get_transactions_pagination
Description of the Change
This PR introduces pagination logic to get account transactions query.
You can now specify starting hash and page size of the response.
Benefits
Pagination
Possible Drawbacks
Slower queries due to added complexity
Alternate Designs [optional]
In several places, additional indexes can be introduced in the future to optimize query