mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-12-12 12:09:08 +03:00
relational-query: deprecation.
This commit is contained in:
parent
7f2b1f8876
commit
c048f29f14
@ -193,11 +193,12 @@ composeOrderBy = d where
|
|||||||
order Desc = DESC
|
order Desc = DESC
|
||||||
|
|
||||||
|
|
||||||
|
{-# DEPRECATED Assignments "use [Assignment]." #-}
|
||||||
-- | Assignment pair list.
|
-- | Assignment pair list.
|
||||||
type Assignments = [Assignment]
|
type Assignments = [Assignment]
|
||||||
|
|
||||||
-- | Compose SET clause from 'Assignments'.
|
-- | Compose SET clause from 'Assignments'.
|
||||||
composeSets :: Assignments -> StringSQL
|
composeSets :: [Assignment] -> StringSQL
|
||||||
composeSets as = assigns where
|
composeSets as = assigns where
|
||||||
assignList = foldr (\ (col, term) r ->
|
assignList = foldr (\ (col, term) r ->
|
||||||
(showsColumnSQL col .=. showsColumnSQL term) : r)
|
(showsColumnSQL col .=. showsColumnSQL term) : r)
|
||||||
@ -206,7 +207,7 @@ composeSets as = assigns where
|
|||||||
| otherwise = SET <> commaed assignList
|
| otherwise = SET <> commaed assignList
|
||||||
|
|
||||||
-- | Compose VALUES clause from 'Assignments'.
|
-- | Compose VALUES clause from 'Assignments'.
|
||||||
composeValues :: Assignments -> StringSQL
|
composeValues :: [Assignment] -> StringSQL
|
||||||
composeValues as = rowConsStringSQL [ showsColumnSQL c | c <- cs ] <> VALUES <>
|
composeValues as = rowConsStringSQL [ showsColumnSQL c | c <- cs ] <> VALUES <>
|
||||||
rowConsStringSQL [ showsColumnSQL c | c <- vs ] where
|
rowConsStringSQL [ showsColumnSQL c | c <- vs ] where
|
||||||
(cs, vs) = unzip as
|
(cs, vs) = unzip as
|
||||||
|
Loading…
Reference in New Issue
Block a user