1
Fork 0

add support for in list, and fix code for in query expr

This commit is contained in:
Jake Wheat 2013-12-13 21:00:06 +02:00
parent 00269617b3
commit 386d835cf8
4 changed files with 57 additions and 26 deletions
Language/SQL/SimpleSQL

View file

@ -59,12 +59,20 @@ back into SQL source text. It attempts to format the output nicely.
> (case ty of
> SqSq -> empty
> SqExists -> text "exists"
> SqIn -> text "in"
> SqAll -> text "all"
> SqSome -> text "some"
> SqAny -> text "any"
> ) <+> parens (queryExpr qe)
> scalarExpr (In b se x) =
> sep [scalarExpr se
> ,if b then empty else text "not"
> ,text "in"
> ,parens (nest 4 $
> case x of
> InList es -> commaSep $ map scalarExpr es
> InQueryExpr qe -> queryExpr qe)]
= query expressions
> queryExpr :: QueryExpr -> Doc