1
Fork 0

add support for union,intersect,except

This commit is contained in:
Jake Wheat 2013-12-13 23:41:12 +02:00
commit 1199342477
4 changed files with 51 additions and 17 deletions
Language/SQL/SimpleSQL

View file

@ -119,6 +119,13 @@ back into SQL source text. It attempts to format the output nicely.
> ,maybeScalarExpr "limit" lm
> ,maybeScalarExpr "offset" off
> ]
> queryExpr (CombineQueryExpr q1 ct q2) =
> sep [queryExpr q1
> ,text $ case ct of
> Union -> "union"
> Intersect -> "intersect"
> Except -> "except"
> ,queryExpr q2]
> selectList :: [(Maybe String, ScalarExpr)] -> Doc
> selectList is = commaSep $ map si is