1
Fork 0
Bugfix for issue Bug: Brackets required in generated select statement…
This commit is contained in:
Jake Wheat 2024-10-07 09:40:32 +01:00 committed by GitHub
commit fb6248a110
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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)