Skip to content

Commit 1c90340

Browse files
Nicholas Santikyleconroy
authored andcommitted
Fix replaceall
1 parent c0b1914 commit 1c90340

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/codegen/golang/templates/stdlib/queryCode.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@ func (q *Queries) {{.MethodName}}(ctx context.Context, {{ dbarg }} {{.Arg.Pair}}
165165
for _, v := range {{.Arg.Name}} {
166166
queryParams = append(queryParams, v)
167167
}
168-
query = strings.Replace(query, "/*SLICE:{{.Arg.Column.Name}}*/?", strings.Repeat(",?", len({{.Arg.Name}}))[1:], 1)
168+
query = strings.ReplaceAll(query, "/*SLICE:{{.Arg.Column.Name}}*/?", strings.Repeat(",?", len({{.Arg.Name}}))[1:])
169169
} else {
170-
query = strings.Replace(query, "/*SLICE:{{.Arg.Column.Name}}*/?", "NULL", 1)
170+
query = strings.ReplaceAll(query, "/*SLICE:{{.Arg.Column.Name}}*/?", "NULL")
171171
}
172172
{{- end }}
173173
{{- if emitPreparedQueries }}

0 commit comments

Comments
 (0)