mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-12-12 12:09:08 +03:00
Renamed.
This commit is contained in:
parent
ea1f2aa153
commit
bcaa16f77b
@ -7,7 +7,7 @@ module Database.Relational.Query.Internal.Context (
|
||||
nextAlias,
|
||||
|
||||
updateProduct, takeProduct, restoreLeft,
|
||||
updateRestriction,
|
||||
addRestriction,
|
||||
updateOrderBy, takeOrderBys, restoreLowOrderBys,
|
||||
|
||||
composeSQL
|
||||
@ -64,8 +64,8 @@ takeProduct ctx = (product ctx, updateProduct' (const Nothing) ctx)
|
||||
restoreLeft :: QueryProductNode -> Product.NodeAttr -> Context -> Context
|
||||
restoreLeft pL naR ctx = updateProduct (Product.growLeft pL naR) ctx
|
||||
|
||||
updateRestriction :: Expr Bool -> Context -> Context
|
||||
updateRestriction e1 ctx =
|
||||
addRestriction :: Expr Bool -> Context -> Context
|
||||
addRestriction e1 ctx =
|
||||
ctx { restriction = Just . uf . restriction $ ctx }
|
||||
where uf Nothing = e1
|
||||
uf (Just e0) = e0 `Projectable.and` e1
|
||||
|
@ -66,11 +66,11 @@ updateContext uf =
|
||||
|
||||
updateJoinRestriction :: Expr Bool -> QueryJoin ()
|
||||
updateJoinRestriction e = updateContext (updateProduct d) where
|
||||
d Nothing = error "addProductRestriction: product is empty!"
|
||||
d Nothing = error "on: product is empty!"
|
||||
d (Just pt) = restrictProduct pt e
|
||||
|
||||
updateRestriction :: Expr Bool -> QueryJoin ()
|
||||
updateRestriction e = updateContext (Context.updateRestriction e)
|
||||
updateRestriction e = updateContext (Context.addRestriction e)
|
||||
|
||||
takeProduct :: QueryJoin (Maybe QueryProductNode)
|
||||
takeProduct = QueryJoin Context.takeProduct
|
||||
|
Loading…
Reference in New Issue
Block a user