1
Fork 0

implement extract

This commit is contained in:
Jake Wheat 2013-12-13 22:38:43 +02:00
parent a001d120c1
commit 5e56a4b560
3 changed files with 14 additions and 2 deletions
Language/SQL/SimpleSQL

View file

@ -35,6 +35,11 @@ back into SQL source text. It attempts to format the output nicely.
> ,text nm <+> scalarExpr b
> ,text "and" <+> scalarExpr c]
> scalarExpr (SpecialOp "extract" [a,n]) =
> text "extract" <> parens (scalarExpr a
> <+> text "from"
> <+> scalarExpr n)
> scalarExpr (SpecialOp nm es) =
> text nm <+> parens (commaSep $ map scalarExpr es)