aptos-core icon indicating copy to clipboard operation
aptos-core copied to clipboard

[storage] add pagination in get_state_values_by_key_prefix() signature

Open msmouse opened this issue 2 years ago • 2 comments

Description

add prev_key and limit as paramters to get_state_values_by_key_prefix to support pagination. return prev_key as a second returning value.

When there is no more items to return, the returned prev_key would be None. the passed-in prev_key is the last key visited previously. pass None in when call it the first time.

Test Plan

ut


This change is Reviewable

msmouse avatar Oct 26 '22 15:10 msmouse

Commandeer.

lightmark avatar Oct 26 '22 17:10 lightmark

It seems I can stamp this PR after I took it over. So cool.

lightmark avatar Oct 27 '22 02:10 lightmark

Due to too much changes, I re-submit the PR with #5353

lightmark avatar Oct 30 '22 03:10 lightmark