Copyright  20132017 Kei Hibino 

License  BSD3 
Maintainer  ex8k.hibino@gmail.com 
Stability  experimental 
Portability  unknown 
Safe Haskell  None 
Language  Haskell2010 
This module defines query building interface classes.
 class (Functor q, Monad q, Functor m, Monad m) => MonadQualify q m where
 class (Functor m, Monad m) => MonadRestrict c m where
 class (Functor m, Monad m, MonadQualify ConfigureQuery m) => MonadQuery m where
 class MonadQuery m => MonadAggregate m where
 class Monad m => MonadPartition c m where
 all' :: MonadQuery m => m ()
 distinct :: MonadQuery m => m ()
 on :: MonadQuery m => Predicate Flat > m ()
 wheres :: MonadRestrict Flat m => Predicate Flat > m ()
 having :: MonadRestrict Aggregated m => Predicate Aggregated > m ()
Query interface classes
class (Functor q, Monad q, Functor m, Monad m) => MonadQualify q m where Source #
Lift interface from base qualify monad.
liftQualify :: q a > m a Source #
Lift from qualify monad q
into MonadQuery
m.
Qualify monad qualifies table form SubQuery
.
(Functor q, Monad q) => MonadQualify q q Source #  
MonadQualify ConfigureQuery QueryUnique Source #  
MonadQualify q m => MonadQualify q (AggregatingSetT m) Source #  Aggregated 
MonadQualify q m => MonadQualify q (QueryJoin m) Source #  
MonadQualify q m => MonadQualify q (Assignings r m) Source # 

MonadQualify q m => MonadQualify q (Orderings c m) Source # 

MonadQualify q m => MonadQualify q (Restrictings c m) Source #  Restricted 
class (Functor m, Monad m) => MonadRestrict c m where Source #
Restrict context interface
MonadRestrict c m => MonadRestrict c (AggregatingSetT m) Source #  Aggregated 
MonadRestrict c m => MonadRestrict c (Assignings r m) Source # 

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

(Monad q, Functor q) => MonadRestrict c (Restrictings c q) Source # 

class (Functor m, Monad m, MonadQualify ConfigureQuery m) => MonadQuery m where Source #
Query building interface.
setDuplication :: Duplication > m () Source #
Specify duplication.
restrictJoin :: Predicate Flat > m () Source #
Add restriction to last join.
query' :: Relation p r > m (PlaceHolders p, Record Flat r) Source #
Join subquery with placeholder parameter p
. query result is not Maybe
.
queryMaybe' :: Relation p r > m (PlaceHolders p, Record Flat (Maybe r)) Source #
Join subquery with placeholder parameter p
. Query result is Maybe
.
MonadQuery QueryUnique Source #  
MonadQuery m => MonadQuery (AggregatingSetT m) Source #  Aggregated 
MonadQuery (QueryJoin ConfigureQuery) Source #  Joinable query instance. 
MonadQuery m => MonadQuery (Orderings c m) Source # 

MonadQuery q => MonadQuery (Restrictings c q) Source #  Restricted 
class MonadQuery m => MonadAggregate m where Source #
Aggregated query building interface extends MonadQuery
.
groupBy :: Record Flat r > m (Record Aggregated r) Source #
Add GROUP BY term into context and get aggregated record.
groupBy' :: AggregateKey (Record Aggregated r) > m (Record Aggregated r) Source #
MonadQuery m => MonadAggregate (AggregatingSetT m) Source #  Aggregated query instance. 
MonadAggregate m => MonadAggregate (Orderings c m) Source # 

MonadAggregate m => MonadAggregate (Restrictings c m) Source #  Resticted 
class Monad m => MonadPartition c m where Source #
Window specification building interface.
partitionBy :: Record c r > m () Source #
Add PARTITION BY term into context.
Monad m => MonadPartition c (PartitioningSetT c m) Source #  Partition clause instance 
MonadPartition c m => MonadPartition c (Orderings c m) Source # 

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 => Predicate Flat > m () Source #
Add restriction to last join. Record type version.
wheres :: MonadRestrict Flat m => Predicate Flat > m () Source #
Add restriction to this not aggregated query.
having :: MonadRestrict Aggregated m => Predicate Aggregated > m () Source #
Add restriction to this aggregated query. Aggregated Record type version.