taskcafe/internal/db/db.go

30 lines
564 B
Go
Raw Permalink Normal View History

2020-04-10 04:40:22 +02:00
// Code generated by sqlc. DO NOT EDIT.
package db
2020-04-10 04:40:22 +02:00
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,
}
}