| // Copyright 2022 The Go Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style | |
| // license that can be found in the LICENSE file. | |
| package db | |
| import ( | |
| "context" | |
| "github.com/jackc/pgconn" | |
| "github.com/jackc/pgx/v4" | |
| ) | |
| type PGDBTX interface { | |
| Exec(context.Context, string, ...any) (pgconn.CommandTag, error) | |
| Query(context.Context, string, ...any) (pgx.Rows, error) | |
| QueryRow(context.Context, string, ...any) pgx.Row | |
| BeginFunc(ctx context.Context, f func(pgx.Tx) error) error | |
| Close() | |
| } |