Files
upstream-mirror 0f4df23290
Some checks failed
kotlin / test (push) Has been skipped
python / test (push) Has been skipped
typescript / test (push) Has been skipped
go / build darwin/amd64 (push) Has been cancelled
go / build linux/amd64 (push) Has been cancelled
go / build windows/amd64 (push) Has been cancelled
go / build darwin/arm64 (push) Has been cancelled
go / build linux/arm64 (push) Has been cancelled
go / build windows/arm64 (push) Has been cancelled
go / test (push) Has been cancelled
go / vuln_check (push) Has been cancelled
snapshot of https://github.com/sqlc-dev/sqlc.git (main, 2026-09-16; blobs > 131072B omitted)
2026-09-16 02:17:34 +05:00

64 lines
2.6 KiB
Cheetah

{{define "interfaceCodeStd"}}
type Querier interface {
{{- $dbtxParam := .EmitMethodsWithDBArgument -}}
{{- range .GoQueries}}
{{- if and (eq .Cmd ":one") ($dbtxParam) }}
{{range .Comments}}//{{.}}
{{end -}}
{{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) ({{.Ret.DefineType}}, error)
{{- else if eq .Cmd ":one"}}
{{range .Comments}}//{{.}}
{{end -}}
{{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) ({{.Ret.DefineType}}, error)
{{- end}}
{{- if and (eq .Cmd ":many") ($dbtxParam) }}
{{range .Comments}}//{{.}}
{{end -}}
{{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) ([]{{.Ret.DefineType}}, error)
{{- else if eq .Cmd ":many"}}
{{range .Comments}}//{{.}}
{{end -}}
{{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) ([]{{.Ret.DefineType}}, error)
{{- end}}
{{- if and (eq .Cmd ":exec") ($dbtxParam) }}
{{range .Comments}}//{{.}}
{{end -}}
{{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) error
{{- else if eq .Cmd ":exec"}}
{{range .Comments}}//{{.}}
{{end -}}
{{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) error
{{- end}}
{{- if and (eq .Cmd ":execrows") ($dbtxParam) }}
{{range .Comments}}//{{.}}
{{end -}}
{{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) (int64, error)
{{- else if eq .Cmd ":execrows"}}
{{range .Comments}}//{{.}}
{{end -}}
{{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) (int64, error)
{{- end}}
{{- if and (eq .Cmd ":execlastid") ($dbtxParam) }}
{{range .Comments}}//{{.}}
{{end -}}
{{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) (int64, error)
{{- else if eq .Cmd ":execlastid"}}
{{range .Comments}}//{{.}}
{{end -}}
{{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) (int64, error)
{{- end}}
{{- if and (eq .Cmd ":execresult") ($dbtxParam) }}
{{range .Comments}}//{{.}}
{{end -}}
{{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) (sql.Result, error)
{{- else if eq .Cmd ":execresult"}}
{{range .Comments}}//{{.}}
{{end -}}
{{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) (sql.Result, error)
{{- end}}
{{- end}}
}
var _ Querier = (*Queries)(nil)
{{end}}