mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-12-15 14:53:28 +03:00
Coordinate around new definitions.
This commit is contained in:
parent
de058f3b13
commit
b04c40cacb
@ -19,7 +19,7 @@ module Database.Relational.Query.Monad.Trans.AggregatingState (
|
||||
|
||||
addGroupBy, addRestriction,
|
||||
|
||||
aggregatedRestriction, aggregateTerms,
|
||||
aggregateRestriction, aggregateTerms,
|
||||
|
||||
composeGroupBys
|
||||
) where
|
||||
@ -61,9 +61,11 @@ addRestriction e1 ctx =
|
||||
where uf Nothing = fromJust e1
|
||||
uf (Just e0) = e0 `exprAnd` fromJust e1
|
||||
|
||||
aggregatedRestriction :: AggregatingContext -> AggregatedQueryRestriction
|
||||
aggregatedRestriction = restriction
|
||||
-- | Finalize context to extract accumulated aggregate restriction state.
|
||||
aggregateRestriction :: AggregatingContext -> AggregatedQueryRestriction
|
||||
aggregateRestriction = restriction
|
||||
|
||||
-- | Finalize context to extract accumulated aggregate terms state.
|
||||
aggregateTerms :: AggregatingContext -> AggregateTerms
|
||||
aggregateTerms = DList.toList . groupByTerms
|
||||
|
||||
|
@ -59,6 +59,7 @@ restoreLowOrderBys :: OrderBys -> OrderingContext -> OrderingContext
|
||||
restoreLowOrderBys ros ctx = ctx { orderBys = orderBys ctx <> ros }
|
||||
-}
|
||||
|
||||
-- | Finalize context to extract accumulated ordering state.
|
||||
orderingTerms :: OrderingContext -> OrderingTerms
|
||||
orderingTerms = DList.toList . orderBys
|
||||
|
||||
|
@ -32,6 +32,7 @@ import qualified Language.SQL.Keyword as SQL
|
||||
-- | Context type for Restrict.
|
||||
newtype RestrictContext = RestrictContext QueryRestriction
|
||||
|
||||
-- | Finalize context to extract accumulated restriction state.
|
||||
restriction :: RestrictContext -> QueryRestriction
|
||||
restriction (RestrictContext r) = r
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user