File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ const isDev =
33
33
( process . env . GRAPHILE_ENV === "development" ||
34
34
process . env . GRAPHILE_ENV === "test" ) ;
35
35
36
- const includeComments =
37
- typeof process !== "undefined" && process . env . PGSQL2_DEBUG === "1" ;
36
+ const alwaysIncludeComments =
37
+ isDev || ( typeof process !== "undefined" && process . env . PGSQL2_DEBUG === "1" ) ;
38
38
39
39
const nodeInspect : CustomInspectFunction = function (
40
40
this : SQLNode | SQLQuery ,
@@ -1099,9 +1099,12 @@ export function placeholder(symbol: symbol, fallback?: SQL): SQL {
1099
1099
return makePlaceholderNode ( symbol , fallback ) ;
1100
1100
}
1101
1101
1102
- export function comment ( commentText : string ) : SQLCommentNode | SQLRawNode {
1103
- if ( includeComments ) {
1104
- return makeCommentNode ( commentText ) ;
1102
+ export function comment (
1103
+ text : string ,
1104
+ always = false ,
1105
+ ) : SQLCommentNode | SQLRawNode {
1106
+ if ( always || alwaysIncludeComments ) {
1107
+ return makeCommentNode ( text ) ;
1105
1108
} else {
1106
1109
return sql . blank ;
1107
1110
}
You can’t perform that action at this time.
0 commit comments