Skip to content

Taxonomy

Pagination boundary

One row repeated, or one row lost, at every page boundary.

What it looks like

  • A cursor that points at the last item returned rather than past it.
  • An offset advanced by the page size rather than by the number of rows actually returned.
  • A hasMore computed from the requested limit rather than the result.

Why it survives review

The first page is always right, and the first page is what gets tested. The error is exactly one row per boundary, which on a page of twenty looks like a rounding artefact in a count somewhere and is dismissed. Nobody reads page four.

How to see it

  1. Walk two consecutive pages by hand and check the boundary row appears exactly once.
  2. Check the termination condition: a paginator that never says it has finished is as broken as one that stops early.
  3. Ask what happens when a row is inserted or deleted between two page requests. An offset-based paginator will skip or repeat.

A minimal pair

Correct

const offset = index + 1;

Defective

const offset = index;

The last row of each page is served again as the first row of the next.

Practise it

No exercise in the corpus sets this class yet. The lesson stands on its own — the corpus grows by adding subjects, and pretending otherwise would hide the gap.