Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype PageSize = PageSize {
- unPageSize :: Int
- data SortOrder
- data Range t = Range {}
- type DesiredRange t = Range (Maybe t)
- bumpPageRange :: Ord typ => SortOrder -> DesiredRange typ -> Range typ -> DesiredRange typ
Documentation
The amount of records in a Page
of results.
Since: 0.1.0.0
Whether to sort by ASC
or DESC
when you're paging over results.
Since: 0.1.0.0
A datatype describing the min and max value of the relevant field that you are ranging over in a non-empty sequence of records.
Since: 0.1.0.0
Instances
Functor Range Source # | |
Foldable Range Source # | |
Defined in Database.Persist.Pagination.Types fold :: Monoid m => Range m -> m # foldMap :: Monoid m => (a -> m) -> Range a -> m # foldr :: (a -> b -> b) -> b -> Range a -> b # foldr' :: (a -> b -> b) -> b -> Range a -> b # foldl :: (b -> a -> b) -> b -> Range a -> b # foldl' :: (b -> a -> b) -> b -> Range a -> b # foldr1 :: (a -> a -> a) -> Range a -> a # foldl1 :: (a -> a -> a) -> Range a -> a # elem :: Eq a => a -> Range a -> Bool # maximum :: Ord a => Range a -> a # minimum :: Ord a => Range a -> a # | |
Traversable Range Source # | |
Eq t => Eq (Range t) Source # | |
Show t => Show (Range t) Source # | |
Ord t => Semigroup (Range t) Source # | |
(Bounded t, Ord t) => Monoid (Range t) Source # | |
type DesiredRange t = Range (Maybe t) Source #
Users aren't required to put a value in for the range - a value of
Nothing
is equivalent to saying "unbounded from below."
Since: 0.1.0.0
bumpPageRange :: Ord typ => SortOrder -> DesiredRange typ -> Range typ -> DesiredRange typ Source #
Modify the DesiredRange
according to the Range
that was provided
by the query and the SortOrder
.
Since: 0.1.0.0