| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | // Code generated by sqlc. DO NOT EDIT. |
||
| 5 | package db |
||
| 6 | |||
| 7 | import ( |
||
| 8 | "context" |
||
| 9 | |||
| 10 | "github.com/jackc/pgx/v5" |
||
| 11 | "github.com/jackc/pgx/v5/pgconn" |
||
| 12 | ) |
||
| 13 | |||
| 14 | type DBTX interface { |
||
| 15 | Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) |
||
| 16 | Query(context.Context, string, ...interface{}) (pgx.Rows, error) |
||
| 17 | QueryRow(context.Context, string, ...interface{}) pgx.Row |
||
| 18 | } |
||
| 19 | |||
| 20 | func New(db DBTX) *Queries { |
||
| 21 | return &Queries{db: db} |
||
| 22 | } |
||
| 23 | |||
| 24 | type Queries struct { |
||
| 25 | db DBTX |
||
| 26 | } |
||
| 27 | |||
| 28 | func (q *Queries) WithTx(tx pgx.Tx) *Queries { |
||
| 29 | return &Queries{ |
||
| 30 | db: tx, |
||
| 31 | } |
||
| 33 |