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

Redefines the total of cursor pagination. #342

Merged
merged 4 commits into from
Oct 30, 2023

Conversation

jiho-kr
Copy link
Contributor

@jiho-kr jiho-kr commented Oct 27, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

The total of cursor pagination and offset pagination are different.

The total of offset pagination uses the total value of the first page as is,
but the total of cursor pagination uses the value minus the number of data.

first page  (data length is 50)
- total count(88)
next page (data length is 33)
- prev page total count(88) - data count(33) = 50
next page (data length is 0)
- prev page total count(50) - data count(0) = 50

What is the new behavior?

The total value of cursor pagination is used as the total value of the first page.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@jiho-kr jiho-kr requested review from Pigrabbit and lavelee October 27, 2023 05:54
@jiho-kr jiho-kr self-assigned this Oct 27, 2023
@jiho-kr jiho-kr added the enhancement New feature or request label Oct 27, 2023
@jiho-kr jiho-kr merged commit f35cb4a into woowabros:main Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant