Skip to content

Scan query should handle pagination differently #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ktwbc opened this issue Jan 23, 2025 · 2 comments
Open

Scan query should handle pagination differently #69

ktwbc opened this issue Jan 23, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@ktwbc
Copy link

ktwbc commented Jan 23, 2025

Is your feature request related to a problem?

When doing a search that performs a scan on the table, it would be nice if the scan would keep scanning until the number of received items matches the limit as opposed to the limit being used on the scan itself.

Describe the solution you'd like

For example:

With a normal read, the limit determines how many records to show, very simple. If I have the limit as 100 (the max of a single call to ddb), I get 100 records.

However, if I put in a search that performs a scan, the scan is performed up to the same limit only one page at a time, which doesn't match the number of hits. To put this another way:

If I put in a query that will match records 51, 104, 198 and 202, and Limit is set to 100, and it performs a scan, the only result I'll see is the one row. (51) because that's the only match of that first page of 100. I have to click next to see the next two records, and click next again to see the third. If I was putting in a scan and a limit, I would expect the limit to apply to returned results instead. So in the background, it would scan the first page, find the first hit, but that's only one record, so keep going to page 2, which finds 2 more. And that's only 3, below my 100 limit, so keep scanning, up until returned results matches the limit.

So in scanning you basically have to track the limit independently of what's going on with dynamodb behind the scenes.

The Dynobase app does this pretty well, which I continue to use for scan queries like this but that software has been abandoned, so it'd be really nice to just use your app exclusively.

Additional context

No response

@ktwbc ktwbc added the enhancement New feature or request label Jan 23, 2025
@dkBrazz
Copy link

dkBrazz commented Feb 11, 2025

It is pretty similar to #65

@AntonShuvaev
Copy link
Owner

Thanks for the suggestion! I plan to implement this feature soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants