1
0

db.go 569 B

1234567891011121314151617181920212223242526272829303132
  1. // Code generated by sqlc. DO NOT EDIT.
  2. // versions:
  3. // sqlc v1.27.0
  4. package authors
  5. import (
  6. "context"
  7. "github.com/jackc/pgx/v5"
  8. "github.com/jackc/pgx/v5/pgconn"
  9. )
  10. type DBTX interface {
  11. Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
  12. Query(context.Context, string, ...interface{}) (pgx.Rows, error)
  13. QueryRow(context.Context, string, ...interface{}) pgx.Row
  14. }
  15. func New(db DBTX) *Queries {
  16. return &Queries{db: db}
  17. }
  18. type Queries struct {
  19. db DBTX
  20. }
  21. func (q *Queries) WithTx(tx pgx.Tx) *Queries {
  22. return &Queries{
  23. db: tx,
  24. }
  25. }