opaleye-0.5.2.2: An SQL-generating DSL targeting PostgreSQL

Safe HaskellNone
LanguageHaskell2010

Opaleye.Internal.Order

Synopsis

Documentation

newtype Order a Source #

An Order a represents a sort order and direction for the elements of the type a. Multiple Orders can be composed with mappend or (<>) from Data.Monoid. If two rows are equal according to the first Order in the mappend, the second is used, and so on.

Constructors

Order (a -> [(OrderOp, PrimExpr)]) 

Instances

Divisible Order Source # 

Methods

divide :: (a -> (b, c)) -> Order b -> Order c -> Order a #

conquer :: Order a #

Decidable Order Source # 

Methods

lose :: (a -> Void) -> Order a #

choose :: (a -> Either b c) -> Order b -> Order c -> Order a #

Contravariant Order Source # 

Methods

contramap :: (a -> b) -> Order b -> Order a #

(>$) :: b -> Order b -> Order a #

Semigroup (Order a) Source # 

Methods

(<>) :: Order a -> Order a -> Order a #

sconcat :: NonEmpty (Order a) -> Order a #

stimes :: Integral b => b -> Order a -> Order a #

Monoid (Order a) Source # 

Methods

mempty :: Order a #

mappend :: Order a -> Order a -> Order a #

mconcat :: [Order a] -> Order a #

order :: OrderOp -> (a -> Column b) -> Order a Source #

orderByU :: Order a -> (a, PrimQuery, Tag) -> (a, PrimQuery, Tag) Source #

limit' :: Int -> (a, PrimQuery, Tag) -> (a, PrimQuery, Tag) Source #

offset' :: Int -> (a, PrimQuery, Tag) -> (a, PrimQuery, Tag) Source #