1
Fork 0

Bugfix for issue Bug: Brackets required in generated select statement. #57

This commit is contained in:
hanjoosten 2024-10-05 17:54:31 +02:00
parent 39c8e05224
commit 0a3c672cd5
2 changed files with 2 additions and 0 deletions

View file

@ -406,6 +406,7 @@ queryExpr d (Values vs) =
pretty "values" pretty "values"
<+> nest 7 (commaSep (map (parens . commaSep . map (scalarExpr d)) vs)) <+> nest 7 (commaSep (map (parens . commaSep . map (scalarExpr d)) vs))
queryExpr _ (Table t) = pretty "table" <+> names t queryExpr _ (Table t) = pretty "table" <+> names t
queryExpr d (QueryExprParens qe) = parens (queryExpr d qe)
queryExpr d (QEComment cmt v) = queryExpr d (QEComment cmt v) =
vsep $ map comment cmt <> [queryExpr d v] vsep $ map comment cmt <> [queryExpr d v]

View file

@ -373,6 +373,7 @@ This would make some things a bit cleaner?
,qeQueryExpression :: QueryExpr} ,qeQueryExpression :: QueryExpr}
| Values [[ScalarExpr]] | Values [[ScalarExpr]]
| Table [Name] | Table [Name]
| QueryExprParens QueryExpr
| QEComment [Comment] QueryExpr | QEComment [Comment] QueryExpr
deriving (Eq,Show,Read,Data,Typeable) deriving (Eq,Show,Read,Data,Typeable)