-
Notifications
You must be signed in to change notification settings - Fork 141
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
Respect the pagination size for queries #117
base: master
Are you sure you want to change the base?
Conversation
return queryRequest; | ||
} | ||
|
||
private void applyPageableIfSpecified(QueryRequest queryRequest) { | ||
if (pageable != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Pageable#unpaged()
instead
public DynamoDBQueryCreator(PartTree tree, | ||
DynamoDBEntityInformation<T, ID> entityMetadata, | ||
DynamoDBOperations dynamoDBOperations) { | ||
super(tree, entityMetadata, dynamoDBOperations); | ||
pageable = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Pageable#unpaged()
instead
And update for the Wiki/Documentation is required |
5b70674
to
a14956b
Compare
Codecov Report
@@ Coverage Diff @@
## master #117 +/- ##
=============================================
- Coverage 64.29% 48.95% -15.35%
+ Complexity 549 424 -125
=============================================
Files 71 70 -1
Lines 1882 1859 -23
Branches 354 352 -2
=============================================
- Hits 1210 910 -300
- Misses 543 828 +285
+ Partials 129 121 -8
Continue to review full report at Codecov.
|
Updated documentation at https://github.com/derjust/spring-data-dynamodb/wiki/Query-Size-Limits-and-Pageable |
Second thought on |
This change respects the pagination size as provided from a Pageable object given to a findXXX method. Mostly important in conjunction with lazy list processing via ```java DynamoDBMapperConfig.Builder builder = new DynamoDBMapperConfig.Builder(); builder.setPaginationLoadingStrategy(PaginationLoadingStrategy.ITERATION_ONLY); ``` as this loads the result set of a query page-by-page. Also see the comments in `com.amazonaws.services.dynamodbv2.datamodeling.PaginatedQueryList<T>` as used by `org.socialsignin.spring.data.dynamodb.core.DynamoDBTemplate.query(Class<T>, QueryRequest)`
a14956b
to
437d47a
Compare
@derjust - Do you plan on merging this PR anytime soon? Trying to decide if I should use the DDB mapper directly instead of relying on spring-data-dynamodb. Thank you! |
This change respects the pagination size as provided from a Pageable
object given to a findXXX method.
Mostly important in conjunction with lazy list processing via
as this loads the result set of a query page-by-page.
Also see the comments in
com.amazonaws.services.dynamodbv2.datamodeling.PaginatedQueryList<T>
asused by
org.socialsignin.spring.data.dynamodb.core.DynamoDBTemplate.query(Class<T>, QueryRequest)