1
Fork 0

add support for subqueries in scalar expressions

This commit is contained in:
Jake Wheat 2013-12-13 20:43:28 +02:00
parent d6d91b1935
commit 00269617b3
4 changed files with 53 additions and 13 deletions
Language/SQL/SimpleSQL

View file

@ -55,6 +55,16 @@ back into SQL source text. It attempts to format the output nicely.
> scalarExpr (CastOp (TypeName tn) s) =
> text tn <+> quotes (text s)
> scalarExpr (SubQueryExpr ty qe) =
> (case ty of
> SqSq -> empty
> SqExists -> text "exists"
> SqIn -> text "in"
> SqAll -> text "all"
> SqSome -> text "some"
> SqAny -> text "any"
> ) <+> parens (queryExpr qe)
= query expressions
> queryExpr :: QueryExpr -> Doc