You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to setup sqlcommenter in my project for use in a GCP project so that I can see queries annotated by tag. In order to dynamically add comments I ended up needing slonik-sql-tag-raw (a valid use case!) but eventually realized that all comments are being stripped from the final sql (commit: 8c505b2).
Desired Behavior
Ideally, there would be a way to opt out of this comment-stripping behavior, either globally or per-query. Perhaps this could be done with a new sql method? Or, it would be neat if sqlcommenter format was supported directly, but I understand that its pretty specific requirement.
Motivation
Currently, all comments are stripped from the final sql using pg-minify, but in some cases its necessary to include comments in the final sql so that database engines can tag queries. This is very useful when trying to monitor query performance.
The text was updated successfully, but these errors were encountered:
mgreenw
changed the title
Option to Not Remove Comments / Support sqlcommenter
Option to Not Strip SQL Comments / Support sqlcommenter
Apr 5, 2023
mgreenw
changed the title
Option to Not Strip SQL Comments / Support sqlcommenter
Support for sqlcommenter: Option to Not Strip SQL Comments
Apr 5, 2023
Still on 24.0.0 so that may just be our problem. +1 to the thoughts here: #450. I like / appreciate the changes but its been very hard to upgrade with so many breaking changes.
I am trying to setup
sqlcommenter
in my project for use in a GCP project so that I can see queries annotated by tag. In order to dynamically add comments I ended up needingslonik-sql-tag-raw
(a valid use case!) but eventually realized that all comments are being stripped from the final sql (commit: 8c505b2).Desired Behavior
Ideally, there would be a way to opt out of this comment-stripping behavior, either globally or per-query. Perhaps this could be done with a new
sql
method? Or, it would be neat ifsqlcommenter
format was supported directly, but I understand that its pretty specific requirement.Motivation
Currently, all comments are stripped from the final sql using
pg-minify
, but in some cases its necessary to include comments in the final sql so that database engines can tag queries. This is very useful when trying to monitor query performance.The text was updated successfully, but these errors were encountered: