ihp-1.6.0: Haskell Web Framework
Copyright(c) digitally induced GmbH 2025
Safe HaskellNone
LanguageGHC2021

IHP.Pagination.Internal

Description

These helpers derive the effective page size, the current page, and the SQL offset from the request's page and maxItems query parameters.

They live in their own module so that every paginator stays in lockstep: ControllerFunctions (the QueryBuilder and raw-SQL paginators) and the typed-SQL paginator in ihp-typed-sql all share the exact same limits, the same 200-item cap, and the same offset math instead of reimplementing it.

Documentation

pageSize' :: (?request :: Request) => Options -> Int Source #

page :: (?request :: Request) => Int Source #