Changelog History
Page 1
-
v1.1.1.0 Changes
- โ Add
PaginationConfig
and various*With
-flavored functions for customizing things like per-page size andGET
parameter naming @eahlberg
- โ Add
-
v1.1.0.2 Changes
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. -
v1.1.0.1 Changes
- Export
getCurrentPage
- Simplify some constraints with
MonadHandler
- Export
-
v1.1.0.0 Changes
- 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
-
v0.11.0 Changes
- โ Add
simplePaginationWidget
- โ Add
-
v0.10.1 Changes
- ๐ Support persistent-2.5
-
v0.10.0 Changes
- Require yesod-1.4 & persistent-2.0
-
v0.9.1 Changes
- ๐ Allow text-2.0
- Require persistent-1.3
-
v0.9 Changes
๐ 1.0 Release Candidate
-
v0.4.1 Changes
No changes