fix(funcspec): enhance quote detection for parameters

This commit is contained in:
Hein
2026-05-15 08:26:59 +02:00
parent bce27f7ed2
commit 8101be4531

View File

@@ -991,8 +991,8 @@ func getReplacementForBlankParam(sqlquery, param string) string {
charAfter = sqlquery[endIdx] charAfter = sqlquery[endIdx]
} }
// Check if parameter is surrounded by quotes (single quote or dollar sign for PostgreSQL dollar-quoted strings) // Check if parameter is surrounded by quotes (single quote, dollar sign for PostgreSQL dollar-quoted strings, or double quote for JSON string values)
if (charBefore == '\'' || charBefore == '$') && (charAfter == '\'' || charAfter == '$') { if (charBefore == '\'' || charBefore == '$' || charBefore == '"') && (charAfter == '\'' || charAfter == '$' || charAfter == '"') {
// Parameter is in quotes, return empty string // Parameter is in quotes, return empty string
return "" return ""
} }