2023-09-08 22:24:58 +07:00
|
|
|
// Code generated by sqlc. DO NOT EDIT.
|
|
|
|
// versions:
|
2024-02-06 11:55:25 +07:00
|
|
|
// sqlc v1.25.0
|
2023-09-08 22:24:58 +07:00
|
|
|
|
|
|
|
package db
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2024-02-06 11:55:25 +07:00
|
|
|
|
|
|
|
"github.com/jackc/pgx/v5"
|
|
|
|
"github.com/jackc/pgx/v5/pgconn"
|
2023-09-08 22:24:58 +07:00
|
|
|
)
|
|
|
|
|
|
|
|
type DBTX interface {
|
2024-02-06 11:55:25 +07:00
|
|
|
Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
|
|
|
|
Query(context.Context, string, ...interface{}) (pgx.Rows, error)
|
|
|
|
QueryRow(context.Context, string, ...interface{}) pgx.Row
|
2023-09-08 22:24:58 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
func New(db DBTX) *Queries {
|
|
|
|
return &Queries{db: db}
|
|
|
|
}
|
|
|
|
|
|
|
|
type Queries struct {
|
|
|
|
db DBTX
|
|
|
|
}
|
|
|
|
|
2024-02-06 11:55:25 +07:00
|
|
|
func (q *Queries) WithTx(tx pgx.Tx) *Queries {
|
2023-09-08 22:24:58 +07:00
|
|
|
return &Queries{
|
|
|
|
db: tx,
|
|
|
|
}
|
|
|
|
}
|