packages feed

relational-query 0.2.0.0 → 0.2.1.0

raw patch · 3 files changed

+11/−7 lines, 3 files

Files

relational-query.cabal view
@@ -1,5 +1,5 @@ name:                relational-query-version:             0.2.0.0+version:             0.2.1.0 synopsis:            Typeful, Modular, Relational, algebraic query engine description:         This package contiains typeful relation structure and                      relational-algebraic query building DSL which can
src/Database/Relational/Query.hs view
@@ -58,7 +58,7 @@ import Database.Relational.Query.ProjectableExtended import Database.Relational.Query.Monad.Class   (MonadQualify, MonadRestrict, MonadQuery, MonadAggregate,-   distinct, all', on, wheres, groupBy, having, onE, wheresE, havingE)+   distinct, all', on, wheres, groupBy, having, restrict, onE, wheresE, havingE) import Database.Relational.Query.Monad.Trans.Aggregating   (groupBy', key, key', set, bkey, rollup, cube, groupingSets) import Database.Relational.Query.Monad.Trans.Ordering (orderBy, asc, desc)
src/Database/Relational/Query/Monad/Class.hs view
@@ -16,7 +16,7 @@   MonadQualify (..), MonadQualifyUnique(..), MonadRestrict (..),   MonadQuery (..), MonadAggregate (..), MonadPartition (..), -  all', distinct,+  all', distinct, restrict,   onE, on, wheresE, wheres,   groupBy,   havingE, having@@ -91,12 +91,16 @@ on =  restrictJoin . expr  -- | Add restriction to this query.+restrict :: MonadRestrict c m => Projection c (Maybe Bool) -> m ()+restrict =  restrictContext . expr++-- | Add restriction to this query. Expr type version. wheresE :: MonadRestrict Flat m => Expr Flat (Maybe Bool) -> m () wheresE =  restrictContext --- | Add restriction to this query. Projection type version.+-- | Add restriction to this not aggregated query. wheres :: MonadRestrict Flat m => Projection Flat (Maybe Bool) -> m ()-wheres =  restrictContext . expr+wheres =  restrict  -- | Add /GROUP BY/ term into context and get aggregated projection. groupBy :: MonadAggregate m@@ -106,10 +110,10 @@   mapM_ unsafeAddAggregateElement [ aggregateColumnRef col | col <- Projection.columns p]   return $ Projection.unsafeToAggregated p --- | Add restriction to this aggregated query.+-- | Add restriction to this aggregated query. Expr type version. havingE :: MonadRestrict Aggregated m => Expr Aggregated (Maybe Bool) -> m () havingE =  restrictContext  -- | Add restriction to this aggregated query. Aggregated Projection type version. having :: MonadRestrict Aggregated m => Projection Aggregated (Maybe Bool) -> m ()-having =  restrictContext . expr+having =  restrict