Skip to content

Allow NoSQL to defer request for totals and raise UnsupportedOperationException later#967

Merged
otaviojava merged 2 commits intojakartaee:mainfrom
njr-11:782-allow-nosql-to-defer-request-for-totals
Feb 13, 2025
Merged

Allow NoSQL to defer request for totals and raise UnsupportedOperationException later#967
otaviojava merged 2 commits intojakartaee:mainfrom
njr-11:782-allow-nosql-to-defer-request-for-totals

Conversation

@njr-11
Copy link
Member

@njr-11 njr-11 commented Feb 11, 2025

Accommodate NoSQL databases that are incapable of page totals by clarifying that the request for totals can be deferred until they are asked for, and prepare the user for the possibility of an exception to be raised at that time rather than immediately upon supplying the PageRequest with requestTotals to a repository method.

This goes along with Otavio's #963 where we are trying to figure out a compatible way for NoSQL databases that aren't capable of retrieving totals to be usable for PageRequest instances that by default do not set withoutTotals.

…nException later

Signed-off-by: Nathan Rauh <nathan.rauh@us.ibm.com>
@njr-11 njr-11 added the documentation Improvements or additions to documentation label Feb 11, 2025
@njr-11 njr-11 added this to the 1.1 milestone Feb 11, 2025
@otaviojava otaviojava requested a review from gavinking February 11, 2025 19:25
@gavinking
Copy link
Member

clarifying that the request for totals can be deferred until they are asked for, and prepare the user for the possibility of an exception to be raised at that time

This is a good solution to the problem. 👍

Co-authored-by: Gavin King <gavin@hibernate.org>
@otaviojava otaviojava merged commit 3673b48 into jakartaee:main Feb 13, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants