Skip to content

Add findPage helper to JooqBaseEntityRepository#238

Merged
Rattenkrieg merged 2 commits into
mainfrom
add-findpage-to-entity-repo
May 1, 2026
Merged

Add findPage helper to JooqBaseEntityRepository#238
Rattenkrieg merged 2 commits into
mainfrom
add-findpage-to-entity-repo

Conversation

@Rattenkrieg
Copy link
Copy Markdown
Collaborator

@Rattenkrieg Rattenkrieg commented Apr 30, 2026

Summary

JooqBaseEntityRepository (the base for CreatableEntity repos) didn't expose a paging helper, so consumers had to reach for raw queryExecutor.executeSelect and reimplement the seek/paging plumbing locally. This adds findPage mirroring the one on JooqBaseModelRepository, reusing the same PagingStrategy contract and BasicPagedList wiring — and extracts the shared body so the two repositories don't carry mirrored code.

Scope

  • New PagingExecution.kt with internal executeFindPage(...) carrying the seek/select/map body shared by both repositories.
  • New findPage method on JooqBaseEntityRepository delegating to executeFindPage, with the same generics and contract as the model-repository version.
  • JooqBaseModelRepository.findPage refactored to delegate to executeFindPage (was allRecords(... .page(...)) plus a private SelectConditionStep<R>.page extension — both gone).
  • JooqBaseModelRepository's queryExecutor constructor parameter is now stored as a private field so it can be passed to the shared helper. Constructor signature unchanged.
  • No behaviour changes to existing callers.

@Rattenkrieg Rattenkrieg requested a review from a team as a code owner April 30, 2026 21:38
@Rattenkrieg Rattenkrieg merged commit c3fc6e5 into main May 1, 2026
1 check passed
@Rattenkrieg Rattenkrieg deleted the add-findpage-to-entity-repo branch May 1, 2026 06:52
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.

2 participants