Title: Provide an option in the SqlNNNScriptGenerator classes to preserve comments · Issue #20 · microsoft/SqlScriptDOM · GitHub
Open Graph Title: Provide an option in the SqlNNNScriptGenerator classes to preserve comments · Issue #20 · microsoft/SqlScriptDOM
X Title: Provide an option in the SqlNNNScriptGenerator classes to preserve comments · Issue #20 · microsoft/SqlScriptDOM
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...
Open Graph 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 Sql150ScriptGe...
X 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 Sql1...
Opengraph URL: https://github.com/microsoft/SqlScriptDOM/issues/20
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Provide an option in the SqlNNNScriptGenerator classes to preserve comments","articleBody":"\u003c!-- GitHub Discussions are enabled on this repository --\u003e\r\n\u003c!-- You are welcome to open an feature request issue or create an Idea discussion item --\u003e\r\n\u003c!-- https://github.com/microsoft/DacFx/discussions/new?category=ideas --\u003e\r\n\r\n**Is your feature request related to a problem? Please describe.**\r\nSome 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.\r\n\r\n**Describe the solution you'd like**\r\nProvide 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.\r\n\r\n**Describe alternatives you've considered**\r\nToken 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.","author":{"url":"https://github.com/arvindshmicrosoft","@type":"Person","name":"arvindshmicrosoft"},"datePublished":"2021-10-08T22:33:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/20/SqlScriptDOM/issues/20"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8a93af5f-0abe-470d-162b-248246179f80 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9D22:3FD03:595405:73FCD7:698E7510 |
| html-safe-nonce | b28d67310d57e84893e45c1b5439a0175cda03986a9ae436eca350c0c1b66a70 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RDIyOjNGRDAzOjU5NTQwNTo3M0ZDRDc6Njk4RTc1MTAiLCJ2aXNpdG9yX2lkIjoiNDQ1NDM0NzYyNDI1MDUwNDQ2NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9ccb62eb669c7417ba50a5a52d756fb69557aebde9ef02faae53f79df1477c08 |
| hovercard-subject-tag | issue:1683880675 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/SqlScriptDOM/20/issue_layout |
| twitter:image | https://opengraph.githubassets.com/107ec365ab36fe75854dc6b49c674a663976d3bd4db56979d49246fcc244e252/microsoft/SqlScriptDOM/issues/20 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/107ec365ab36fe75854dc6b49c674a663976d3bd4db56979d49246fcc244e252/microsoft/SqlScriptDOM/issues/20 |
| og:image:alt | 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 Sql150ScriptGe... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | arvindshmicrosoft |
| hostname | github.com |
| expected-hostname | github.com |
| None | f86603f0b4e9df9a462725324a8c84c98fc50866bdb6ae8ff026fabe56a60c57 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/SqlScriptDOM git https://github.com/microsoft/SqlScriptDOM.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 543316377 |
| octolytics-dimension-repository_nwo | microsoft/SqlScriptDOM |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 543316377 |
| octolytics-dimension-repository_network_root_nwo | microsoft/SqlScriptDOM |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7eb8835f5978c5aa7a64336b39e0774a93a9a196 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width