relational-query: deprecation.

This commit is contained in:
Kei Hibino 2017-02-13 23:53:45 +09:00
parent 7f2b1f8876
commit c048f29f14

View File

@ -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