fix: implement pagination in scan command to retrieve all records#279
fix: implement pagination in scan command to retrieve all records#279farzadmf wants to merge 2 commits intoawslabs:mainfrom
Conversation
- Add pagination loop to scan function to handle DynamoDB's 1MB response limit - Collect items across multiple scan operations until requested limit is reached - Maintain backward compatibility with existing output formats - Bump version to 0.3.1
|
Thank you for the PR! I appreciate you taking the time to address this issue. While I agree that there are valid use cases for paginating through scan results, I have some concerns about the current approach:
Instead, I'm thinking a more explicit design might work better:
That said, the What do you think about this approach? |
|
Thank you @StoneDot for the reply; I honestly didn't think much before opening the PR as I did a quick and dirty "hack" to match The
it will add a bit of a "friction" to That being said, in my mind at least, it's like "I want this number of results (in other words, I want to limit my results to that number), so I think it's somehow an "internal" thing that we need to go through pages to return that number of results. So, maybe there would be command descriptions etc. explaining something like "if you specify a high limit, you may use extra capacity units, need to pay more, so make sure you know what you're doing", but, still, I think |
|
I've added a comment in #278 explaining my thinking about the separation between After reading that, has your perspective on the |
Description of changes:
Closes #278
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.