|
3 | 3 | {{- $dbtxParam := .EmitMethodsWithDBArgument -}}
|
4 | 4 | {{- range .GoQueries}}
|
5 | 5 | {{- if and (eq .Cmd ":one") ($dbtxParam) }}
|
| 6 | + {{range .Comments}}//{{.}} |
| 7 | + {{end -}} |
6 | 8 | {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) ({{.Ret.DefineType}}, error)
|
7 | 9 | {{- else if eq .Cmd ":one" }}
|
| 10 | + {{range .Comments}}//{{.}} |
| 11 | + {{end -}} |
8 | 12 | {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) ({{.Ret.DefineType}}, error)
|
9 | 13 | {{- end}}
|
10 | 14 | {{- if and (eq .Cmd ":many") ($dbtxParam) }}
|
| 15 | + {{range .Comments}}//{{.}} |
| 16 | + {{end -}} |
11 | 17 | {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) ([]{{.Ret.DefineType}}, error)
|
12 | 18 | {{- else if eq .Cmd ":many" }}
|
| 19 | + {{range .Comments}}//{{.}} |
| 20 | + {{end -}} |
13 | 21 | {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) ([]{{.Ret.DefineType}}, error)
|
14 | 22 | {{- end}}
|
15 | 23 | {{- if and (eq .Cmd ":exec") ($dbtxParam) }}
|
| 24 | + {{range .Comments}}//{{.}} |
| 25 | + {{end -}} |
16 | 26 | {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) error
|
17 | 27 | {{- else if eq .Cmd ":exec" }}
|
| 28 | + {{range .Comments}}//{{.}} |
| 29 | + {{end -}} |
18 | 30 | {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) error
|
19 | 31 | {{- end}}
|
20 | 32 | {{- if and (eq .Cmd ":execrows") ($dbtxParam) }}
|
| 33 | + {{range .Comments}}//{{.}} |
| 34 | + {{end -}} |
21 | 35 | {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) (int64, error)
|
22 | 36 | {{- else if eq .Cmd ":execrows" }}
|
| 37 | + {{range .Comments}}//{{.}} |
| 38 | + {{end -}} |
23 | 39 | {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) (int64, error)
|
24 | 40 | {{- end}}
|
25 | 41 | {{- if and (eq .Cmd ":execresult") ($dbtxParam) }}
|
| 42 | + {{range .Comments}}//{{.}} |
| 43 | + {{end -}} |
26 | 44 | {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) (pgconn.CommandTag, error)
|
27 | 45 | {{- else if eq .Cmd ":execresult" }}
|
| 46 | + {{range .Comments}}//{{.}} |
| 47 | + {{end -}} |
28 | 48 | {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) (pgconn.CommandTag, error)
|
29 | 49 | {{- end}}
|
30 | 50 | {{- if and (eq .Cmd ":copyfrom") ($dbtxParam) }}
|
| 51 | + {{range .Comments}}//{{.}} |
| 52 | + {{end -}} |
31 | 53 | {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.SlicePair}}) (int64, error)
|
32 | 54 | {{- else if eq .Cmd ":copyfrom" }}
|
| 55 | + {{range .Comments}}//{{.}} |
| 56 | + {{end -}} |
33 | 57 | {{.MethodName}}(ctx context.Context, {{.Arg.SlicePair}}) (int64, error)
|
34 | 58 | {{- end}}
|
35 | 59 | {{- if and (or (eq .Cmd ":batchexec") (eq .Cmd ":batchmany") (eq .Cmd ":batchone")) ($dbtxParam) }}
|
| 60 | + {{range .Comments}}//{{.}} |
| 61 | + {{end -}} |
36 | 62 | {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.SlicePair}}) *{{.MethodName}}BatchResults
|
37 | 63 | {{- else if or (eq .Cmd ":batchexec") (eq .Cmd ":batchmany") (eq .Cmd ":batchone") }}
|
| 64 | + {{range .Comments}}//{{.}} |
| 65 | + {{end -}} |
38 | 66 | {{.MethodName}}(ctx context.Context, {{.Arg.SlicePair}}) *{{.MethodName}}BatchResults
|
39 | 67 | {{- end}}
|
40 | 68 |
|
|
0 commit comments