Skip to content
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

fix(pagenumber): fix pagenumber result error #16

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

arnaud-thorel-of
Copy link
Contributor

Page result failure on totalPages calculation

PostgrestClient only know resultData and RangeInformation (Offset-Limit/Count) -> Example : (0-9/995)
Before :
Calculate total pages on 995 / ((9-0)+1) => 100 pages (99 pages of 10 elements + 1 page of 5 element)
But fail on last page because range result is 990-995/995 => will calculate totalPages on 995 / 5 items

Now :
Calculation is based on PageRequest items and not only on the result

@arnaud-thorel-of arnaud-thorel-of linked an issue Jan 29, 2024 that may be closed by this pull request
Copy link

codecov bot commented Jan 29, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (d3e0f47) 97.66% compared to head (4fb97d9) 98.46%.
Report is 3 commits behind head on main.

Files Patch % Lines
...france/querydsl/postgrest/PostgrestRepository.java 93.10% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main      #16      +/-   ##
============================================
+ Coverage     97.66%   98.46%   +0.79%     
- Complexity      202      208       +6     
============================================
  Files            39       40       +1     
  Lines           385      390       +5     
  Branches         20       17       -3     
============================================
+ Hits            376      384       +8     
+ Partials          9        6       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@arnaud-thorel-of arnaud-thorel-of merged commit 1568102 into main Jan 30, 2024
3 of 4 checks passed
@arnaud-thorel-of arnaud-thorel-of deleted the 15-fix-page-result-pagenumber branch January 30, 2024 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix : Page result (pageNumber)
1 participant