| Summary: | Formatting screws up SQL statements | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Justin Spadea <jspadea> | ||||||
| Component: | EDT | Assignee: | Yun Feng Ma <mayunf> | ||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||
| Severity: | major | ||||||||
| Priority: | P1 | CC: | chenzhh, jqian, svihovec | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Jimmy, the formatter code needs to match the parser definition the egl.cup file if there are parser changes in egl.cup, then please update the formatter visitor, etc to update them The egl.cup file did have a few changes for new/changed syntax in EDT. For example, the "with" clause can be a WithExpressionClause in addition to the already-existing WithInlineSQLClause ("with myVariable" instead of "with #sql{}").
then while fixing this bug, it should also include the with clause Created attachment 205574 [details]
Patch
Here is a patch. Thanks.
Created attachment 205591 [details]
Patch for preference page /IO statement
Hi Jing, the "with" issue is fixed in this patch. Now tix is in. Thanks. Verified |
The following statements get screwed up, probably due to parser changes: add delete execute foreach prepare replace Examples: library test function foo() expr string; ds SQLDataSource?; rs SQLResultSet?; stmt SQLStatement?; r rec; add r to ds; delete r from ds using expr for r with expr; // delete from ds; // Causes NPE - target is not required for delete execute from rs with stmt; prepare stmt from ds with #sql{}; prepare stmt from ds with expr; replace r to ds using expr for r; replace r to ds with expr for r; forEach(r from rs) end end end record rec i int{@Id}; end