AnthoLume/database/db.go

32 lines
601 B
Go
Raw Normal View History

2023-09-18 23:57:18 +00:00
// Code generated by sqlc. DO NOT EDIT.
// versions:
2024-02-26 00:01:34 +00:00
// sqlc v1.25.0
2023-09-18 23:57:18 +00:00
package database
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,
}
}