Copyright  2013 Kei Hibino 

License  BSD3 
Maintainer  ex8k.hibino@gmail.com 
Stability  experimental 
Portability  unknown 
Safe Haskell  None 
Language  Haskell2010 
This module defines monad transformer which lift from query into query with ordering.
 data Orderings c m a
 orderings :: Monad m => m a > Orderings c m a
 type OrderingTerms = [OrderingTerm]
 orderBy :: (Monad m, ProjectableOrdering (Projection c)) => Projection c t > Order > Orderings c m ()
 asc :: (Monad m, ProjectableOrdering (Projection c)) => Projection c t > Orderings c m ()
 desc :: (Monad m, ProjectableOrdering (Projection c)) => Projection c t > Orderings c m ()
 extractOrderingTerms :: (Monad m, Functor m) => Orderings c m a > m (a, OrderingTerms)
Transformer into query with ordering
Type to accumulate ordering context.
Type c
is ordering term projection context type.
MonadQualify ConfigureQuery QueryAggregate  Instance to lift from qualified table forms into 
MonadQualify ConfigureQuery (Orderings Flat QueryCore)  Instance to lift from qualified table forms into 
MonadRestrict rc m => MonadRestrict rc (Orderings c m) 

MonadTrans (Orderings c)  
Monad m => Monad (Orderings c m)  
Functor m => Functor (Orderings c m)  
Applicative m => Applicative (Orderings c m)  
MonadPartition m => MonadPartition (Orderings c m) 

MonadAggregate m => MonadAggregate (Orderings c m) 

MonadQuery m => MonadQuery (Orderings c m) 

type OrderingTerms = [OrderingTerm] Source
Type for orderby terms
API of query with ordering
:: (Monad m, ProjectableOrdering (Projection c))  
=> Projection c t  Ordering terms to add 
> Order  Order direction 
> Orderings c m ()  Result context with ordering 
Add ordering terms.
:: (Monad m, ProjectableOrdering (Projection c))  
=> Projection c t  Ordering terms to add 
> Orderings c m ()  Result context with ordering 
Add ascendant ordering term.
:: (Monad m, ProjectableOrdering (Projection c))  
=> Projection c t  Ordering terms to add 
> Orderings c m ()  Result context with ordering 
Add descendant ordering term.
Result
extractOrderingTerms :: (Monad m, Functor m) => Orderings c m a > m (a, OrderingTerms) Source
Run Orderings
to get OrderingTerms