generic-paged-db-accumulator
Installation
SKILL.md
Reading a whole table in bounded pages
Within the paged family — the queries written to be read a page at a time — the data-access layer
exposes only (limit, offset) functions, so no call in that family can return an unbounded result
set. (The rest of the layer is not like this and does not pretend to be: plenty of queries take no
limit at all and read a whole table, and at least one takes a limit with the offset pinned at zero.
Those are not the ones this helper is for.) One generic helper turns any member of the paged family
into a full read, and every repository gets the same termination rule instead of writing its own:
// adapted — page size hoisted to a constant (the original repeats the literal three times), and
// the loop restructured for clarity: the source carries its state as a `Pair<Boolean, Int>`
// reassigned at the bottom of the body and has no `break`. Semantics identical.
private const val PAGE = 100