1
Fork 0

add support for values

This commit is contained in:
Jake Wheat 2013-12-17 13:27:16 +02:00
parent 4330b3d7e0
commit c52334943f
5 changed files with 18 additions and 4 deletions
Language/SQL/SimpleSQL

View file

@ -177,6 +177,9 @@
> (vcat $ punctuate comma $ flip map withs $ \(n,q) ->
> name n <+> text "as" <+> parens (queryExpr q))
> ,queryExpr qe]
> queryExpr (Values vs) =
> text "values"
> <+> nest 7 (commaSep (map (parens . commaSep . map scalarExpr) vs))
> selectList :: [(Maybe Name, ScalarExpr)] -> Doc
> selectList is = commaSep $ map si is