add support for subqueries in scalar expressions
This commit is contained in:
parent
d6d91b1935
commit
00269617b3
4 changed files with 53 additions and 13 deletions
Language/SQL/SimpleSQL
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue