Portability  unknown 

Stability  experimental 
Maintainer  ex8k.hibino@gmail.com 
Safe Haskell  None 
This module defines query building interface classes.
 class (Functor q, Monad q, MonadQuery m) => MonadQualify q m where
 liftQualify :: q a > m a
 class (Functor q, Monad q, MonadQuery m) => MonadQualifyUnique q m where
 liftQualifyUnique :: q a > m a
 class (Functor m, Monad m) => MonadRestrict c m where
 restrictContext :: Expr c (Maybe Bool) > m ()
 class (Functor m, Monad m) => MonadQuery m where
 setDuplication :: Duplication > m ()
 restrictJoin :: Expr Flat (Maybe Bool) > m ()
 unsafeSubQuery :: NodeAttr > Qualified SubQuery > m (Projection Flat r)
 class MonadQuery m => MonadAggregate m where
 unsafeAddAggregateElement :: AggregateElem > m ()
 class Monad m => MonadPartition m where
 unsafeAddPartitionKey :: AggregateColumnRef > m ()
 all' :: MonadQuery m => m ()
 distinct :: MonadQuery m => m ()
 onE :: MonadQuery m => Expr Flat (Maybe Bool) > m ()
 on :: MonadQuery m => Projection Flat (Maybe Bool) > m ()
 wheresE :: MonadRestrict Flat m => Expr Flat (Maybe Bool) > m ()
 wheres :: MonadRestrict Flat m => Projection Flat (Maybe Bool) > m ()
 groupBy :: MonadAggregate m => Projection Flat r > m (Projection Aggregated r)
 havingE :: MonadRestrict Aggregated m => Expr Aggregated (Maybe Bool) > m ()
 having :: MonadRestrict Aggregated m => Projection Aggregated (Maybe Bool) > m ()
Query interface classes
class (Functor q, Monad q, MonadQuery m) => MonadQualify q m whereSource
Lift interface from base qualify monad.
liftQualify :: q a > m aSource
Lift from qualify monad q
into MonadQuery
m.
Qualify monad qualifies table form SubQuery
.
MonadQualify ConfigureQuery QueryAggregate  Instance to lift from qualified table forms into 
MonadQualify ConfigureQuery (Orderings Flat QueryCore)  Instance to lift from qualified table forms into 
class (Functor q, Monad q, MonadQuery m) => MonadQualifyUnique q m whereSource
Lift interface from base qualify monad. Another constraint to support unique query.
liftQualifyUnique :: q a > m aSource
Lift from qualify monad q
into MonadQuery
m.
Qualify monad qualifies table form SubQuery
.
MonadQualifyUnique ConfigureQuery QueryUnique  Instance to lift from qualified table forms into 
class (Functor m, Monad m) => MonadRestrict c m whereSource
Restrict context interface
:: Expr c (Maybe Bool) 

> m ()  Restricted query context 
Add restriction to this context.
MonadRestrict c m => MonadRestrict c (AggregatingSetT m)  Aggregated 
(Monad q, Functor q) => MonadRestrict c (Restrictings c q) 

MonadRestrict rc m => MonadRestrict rc (Orderings c m) 

MonadRestrict c m => MonadRestrict c (Assignings r m) 

MonadRestrict Flat q => MonadRestrict Flat (Restrictings Aggregated q)  Restricted 
class (Functor m, Monad m) => MonadQuery m whereSource
Query building interface.
setDuplication :: Duplication > m ()Source
Specify duplication.
:: Expr Flat (Maybe Bool) 

> m ()  Restricted query context  Unsafely join subquery with this query. 
Add restriction to last join.
MonadQuery QueryUnique  
MonadQuery m => MonadQuery (AggregatingSetT m)  Aggregated 
(Monad q, Functor q) => MonadQuery (QueryJoin q)  Joinable query instance. 
MonadQuery q => MonadQuery (Restrictings c q)  Restricted 
MonadQuery m => MonadQuery (Orderings c m) 

class MonadQuery m => MonadAggregate m whereSource
Aggregated query building interface extends MonadQuery
.
unsafeAddAggregateElementSource
:: AggregateElem  Grouping element to add into group by clause 
> m ()  Result context 
Add group by term into context and get aggregated projection.
MonadQuery m => MonadAggregate (AggregatingSetT m)  Aggregated query instance. 
MonadAggregate m => MonadAggregate (Restrictings c m)  Resticted 
MonadAggregate m => MonadAggregate (Orderings c m) 

class Monad m => MonadPartition m whereSource
Window specification building interface.
:: AggregateColumnRef  Partitioning key to add into partition by clause 
> m ()  Result context 
Monad m => MonadPartition (PartitioningSetT c m)  Partition clause instance 
MonadPartition m => MonadPartition (Orderings c m) 

all' :: MonadQuery m => m ()Source
Specify ALL attribute to query context.
distinct :: MonadQuery m => m ()Source
Specify DISTINCT attribute to query context.
on :: MonadQuery m => Projection Flat (Maybe Bool) > m ()Source
Add restriction to last join. Projection type version.
wheresE :: MonadRestrict Flat m => Expr Flat (Maybe Bool) > m ()Source
Add restriction to this query.
wheres :: MonadRestrict Flat m => Projection Flat (Maybe Bool) > m ()Source
Add restriction to this query. Projection type version.
:: MonadAggregate m  
=> Projection Flat r  Projection to add into group by 
> m (Projection Aggregated r)  Result context and aggregated projection 
Add GROUP BY term into context and get aggregated projection.
havingE :: MonadRestrict Aggregated m => Expr Aggregated (Maybe Bool) > m ()Source
Add restriction to this aggregated query.
having :: MonadRestrict Aggregated m => Projection Aggregated (Maybe Bool) > m ()Source
Add restriction to this aggregated query. Aggregated Projection type version.