gostart/data/db.go

32 lines
597 B
Go
Raw Permalink Normal View History

2022-11-29 19:55:00 -07:00
// Code generated by sqlc. DO NOT EDIT.
// versions:
2023-04-24 19:44:18 -06:00
// sqlc v1.17.2
2022-11-29 19:55:00 -07:00
package data
import (
"context"
"database/sql"
)
type DBTX interface {
ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
PrepareContext(context.Context, string) (*sql.Stmt, error)
QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}
func New(db DBTX) *Queries {
return &Queries{db: db}
}
type Queries struct {
db DBTX
}
func (q *Queries) WithTx(tx *sql.Tx) *Queries {
return &Queries{
db: tx,
}
}