Skip to content

Commit ed9272f

Browse files
committed
add interface check for batchmany and batchone
1 parent 98ae170 commit ed9272f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

internal/codegen/golang/templates/pgx/interfaceCode.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
{{- else if eq .Cmd ":copyfrom" }}
3333
{{.MethodName}}(ctx context.Context, {{.Arg.SlicePair}}) (int64, error)
3434
{{- end}}
35-
{{- if and (eq .Cmd ":batchexec") ($dbtxParam) }}
35+
{{- if and (or (eq .Cmd ":batchexec") (eq .Cmd ":batchmany") (eq .Cmd ":batchone")) ($dbtxParam) }}
3636
{{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.SlicePair}}) *{{.MethodName}}BatchResults
37-
{{- else if eq .Cmd ":batchexec" }}
37+
{{- else if or (eq .Cmd ":batchexec") (eq .Cmd ":batchmany") (eq .Cmd ":batchone") }}
3838
{{.MethodName}}(ctx context.Context, {{.Arg.SlicePair}}) *{{.MethodName}}BatchResults
3939
{{- end}}
4040

0 commit comments

Comments
 (0)