-
Notifications
You must be signed in to change notification settings - Fork 34
Description
Is your feature request related to a problem? Please describe.
Some use cases for the Sql*ScriptGenerator classes are actually for code "pretty printing" / formatting. However, using Sql150ScriptGenerator to re-generate the SQL text when provided with an input TSqlFragment, leads to comments (single-line and multi-line) both being excluded from the output.
Describe the solution you'd like
Provide an PreserveComments property in SqlScriptGeneratorOptions with the default being true in the 160 version, and false in the 150 or lower versions for backward compat.
Describe alternatives you've considered
Token re-writing: substituting a faux print statement instead of the comment token is a crude workaround. It fails in case the comment is a trailing suffix of a line within a multi-line T-SQL statement.