1
Fork 0

add support for multiple case when expressions

This commit is contained in:
Jake Wheat 2013-12-17 18:42:00 +02:00
parent ebe522b21d
commit 7d094182b7
6 changed files with 28 additions and 31 deletions
Language/SQL/SimpleSQL

View file

@ -124,7 +124,7 @@
> ++ [text "end"]
> where
> w (t0,t1) =
> text "when" <+> nest 5 (scalarExpr t0)
> text "when" <+> nest 5 (commaSep $ map scalarExpr t0)
> <+> text "then" <+> nest 5 (scalarExpr t1)
> e el = text "else" <+> nest 5 (scalarExpr el)
> scalarExpr (Parens e) = parens $ scalarExpr e