None
- Fix issue with filtering out query parameters @eahlberg
- Support GHCs 9.0 and 9.2
- Re-licensed from BSD3 to MIT
- Released with tight lower bounds and no upper bounds
- Internal modernizations
- Add
PaginationConfig
and various*With
-flavored functions for customizing things like per-page size andGET
parameter naming @eahlberg
-
Functor
,Foldable
, andTraversable
instances forPages
And so necessarily,
Page
.These work by applying the functions to a
Pages
' currentPage
, which is to apply it to each of thePage
's items. These can be used to extend the data post-pagination; purely viafmap
, or with effect usingtraverse
.pages <- runDB $ do users <- selectPaginated 10 [UserFoo ==. foo] [] -- for :: Pages User -> (User -> t UserWithPosts) -> t (Pages UserWithPosts) for users $ \user -> do posts <- selectList [PostUserId ==. user] [Desc PostCreatedAt, LimitTo 5] pure $ UserWithPosts user posts
Yes, this does encourage
N+1
queries, but the idea is they will not be harmful whenN
is small due to pagination.
- Export
getCurrentPage
- Simplify some constraints with
MonadHandler
-
Major rewrite
Interfaces for
paginate
andselectPaginated
now return aPages a
type, free of any visuals-related concerns. This value provides the paginated items and can be passed to functions from theWidgets
model for rendering navigation HTML.The
ellipsed
widget is most like previous behavior withsimple
being a new, simpler alternative. These are (for the most part) not configurable, we should instead strive to create separate widgets if we need different behavior.Everything is now very type-safe: we use
Natural
everywhere, withnewtype
s to differentiate things likePerPage
,PageNumber
s, etc. -
Officially drop support for GHC < 7.10
- Add
simplePaginationWidget
- Support persistent-2.5
- Require yesod-1.4 & persistent-2.0
- Allow text-2.0
- Require persistent-1.3
1.0 Release Candidate
No changes
- Require yesod-1.2 & persistent-1.2
- Require yesod-1.1 & persistent-1.1
- Relax lower bounds on yesod & persistent back to 0.10 / 0.8
- Support custom pagination widgets
- Require yesod-1.0 & persistent-0.9
- Add example
selectPaginated
needs to be given torunDB
by you- Fix disabling of next/prev links when appropriate
First released version.