Replies: 1 comment
-
Greetings. Look at JSQLFormatter, where I create a map of the comments first based on its position considering only non-whitespace characters. Using that map you can re-insert the comments after de-parsing. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goal: SQL Rewrite with comments
Sample:
SELECT NAME, ADDRESS, COL1 /* Important comment!*/ FROM OLD_TABLE WHERE SSN IN ('1', '2');
After rewrite:
SELECT NAME, ADDRESS, COL1 /* Important comment!*/ FROM NEW_TABLE WHERE SSN IN ('3', '4');
(SQL building with jSQLParser is clear.)
How can I use it with jSQLParser?
Beta Was this translation helpful? Give feedback.
All reactions