Skip to content

feat(pagination): implement PDO offset pagination runtime#12

Merged
Maatify merged 4 commits into
mainfrom
codex/implement-pdo-offset-pagination-runtime
Jul 11, 2026
Merged

feat(pagination): implement PDO offset pagination runtime#12
Maatify merged 4 commits into
mainfrom
codex/implement-pdo-offset-pagination-runtime

Conversation

@Maatify

@Maatify Maatify commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Implement the owner-approved PDO offset pagination runtime to provide a standalone, PDO-based pagination component matching the package contract and blueprint.
  • Remove duplication of pagination mechanics across host projects by centralizing page/per-page normalization, deterministic sorting, typed PDO binding, count validation, and row mapping.
  • Preserve existing ordering behavior and package boundaries by adding a new Pagination domain without modifying Ordering, tests, docs, or composer configuration.

Description

  • Add seven pagination runtime classes under src/Pdo/Pagination: PageRequest, SortDirectionEnum, SortWhitelist, PaginationConfig, PdoPaginationQueryDescriptor, PageResult, and PdoPaginator, implementing normalization, whitelist quoting, descriptor validation, count execution, ORDER BY + tie-breaker assembly, typed binding, fetch/mapping, and PageResult invariants.
  • Add three package exceptions under src/Exception: InvalidPaginationConfigurationException, InvalidPaginationQueryException, and PaginationExecutionException, each following the existing package exception pattern and implementing PersistenceException.
  • Implement conservative descriptor and parameter validation (no SQL parsing), strict count cardinality and representation checks, named-placeholder typed bindValue() usage, zero-result and overflow behavior, and the exact paginate() execution flow as specified by the blueprint/contract.
  • No other files were modified, no new interfaces/traits were introduced, and no public API changes were made beyond the contract-defined additions.

Testing

  • Ran php -l against the 10 added files and received "No syntax errors detected" for all files.
  • Ran composer analyse which failed in this environment because the phpstan binary is not available (phpstan: not found).
  • Ran composer test which failed in this environment because the phpunit binary is not available (phpunit: not found).
  • Implementation started from local HEAD 5de52190625f22e42e41d88621276c4a090de0be and the change was committed as HEAD 96b10c46d57173d3b3347db5d66bdb28e1b42393.

Codex Task

@Maatify Maatify merged commit 0bbff43 into main Jul 11, 2026
10 checks passed
@Maatify Maatify deleted the codex/implement-pdo-offset-pagination-runtime branch July 11, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant