Add maxItems to QueryEnhancedRequest to simplify pagination
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 1k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 51
Description
### Describe the feature
Add a direct method (e.g., maxItems() or limit()) to the QueryEnhancedRequest.Builder class in AWS SDK for Java v2 to control the maximum number of items returned in query results.
### Use Case
Currently, developers must implement complex pagination logic using iterators and page size controls to limit result sets, which adds unnecessary complexity to simple use cases. This feature would provide functionality similar to the `--max-items` parameter available in the AWS CLI for DynamoDB queries.
### Proposed Solution
_No response_
### Other Information
_No response_
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### AWS Java SDK version used
2.41.34
### JDK version used
21
### Operating System and version
Windows 11 Enterprise
Contributor guide
Assessment
This issue has not been assessed yet.