-
Notifications
You must be signed in to change notification settings - Fork 202
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
Refactor limit, offset #3120
Refactor limit, offset #3120
Conversation
*/ | ||
@Deprecated(forRemoval = true, since = "4.10") | ||
String META_MEMBER_PAGE_SIZE = "pageSize"; |
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.
Old members are confusing, page size / index are always limit / offset
@@ -434,30 +436,63 @@ protected <RT> Optional<RT> getParameterInRole(MethodInvocationContext<?, ?> con | |||
*/ | |||
@NonNull | |||
protected Pageable getPageable(MethodInvocationContext<?, ?> context) { | |||
Pageable pageable = getParameterInRole(context, TypeRole.PAGEABLE, Pageable.class).orElse(null); | |||
Pageable pageable = getPageableInRole(context); | |||
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.
This method is confusing, we never store direct page index / size into metadata. Offset is never using in the implementation
|
For MongoDB we don't need to store limit, offset in the metadata for the runtime.
For JBDC we can generate the SQL query directly if there is no runtime sorting.