Merge pull request #58 from hanjoosten/bugfix-issue#57
Bugfix for issue Bug: Brackets required in generated select statement…
This commit is contained in:
commit
fb6248a110
|
@ -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]
|
||||||
|
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue