Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

add next_key field to results of get_table_rows to better support pagination #7313

Open
arhag opened this issue May 8, 2019 · 4 comments
Open
Assignees
Labels
documentation Requires attention from documentation team. e.g. documentation is expected to be generated. enhancement

Comments

@arhag
Copy link
Contributor

arhag commented May 8, 2019

Other RPC calls in chain API that allow pagination have a more field that can support the same type as the lower_bound and upper_bound fields of the request. This enables nodeos to include the key that would need to be passed into the lower_bound on a subsequent call to continue retrieving the remaining results from the initial request (ignoring any state changes since that time).

However, the get_table_rows RPC was implemented using the old pattern of providing a boolean more which does not convey enough information to allow a client to generally handle pagination.

So a new string field next_key should be added to get_table_rows_result which is kept as the empty string when more == false, otherwise the string will be set to the key of the next row that wasn't returned in the response in the same format that was expected for the lower_bound and upper_bound fields of the request.

@heipacker
Copy link

sounds good

@andresberrios
Copy link

Why would you call it more2 instead of something meaningful like next_key or something?

@arhag
Copy link
Contributor Author

arhag commented Aug 1, 2019

Why would you call it more2 instead of something meaningful like next_key or something?

Sure. That sounds good.

@arhag arhag changed the title add more2 field to results of get_table_rows to better support pagination add next_key field to results of get_table_rows to better support pagination Aug 1, 2019
@mharrisb1 mharrisb1 added the documentation Requires attention from documentation team. e.g. documentation is expected to be generated. label Aug 5, 2020
@mharrisb1
Copy link

@lparisc tagging you and labeling documentation because work is done for this but it is not documented. Please add new next_key field to get_table_rows documentation https://developers.eos.io/manuals/eos/latest/nodeos/plugins/chain_api_plugin/api-reference/index#operation/get_table_rows

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Requires attention from documentation team. e.g. documentation is expected to be generated. enhancement
Projects
None yet
Development

No branches or pull requests

6 participants