lavender/database/db.go

32 lines
601 B
Go
Raw Normal View History

// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.25.0
2024-02-07 01:18:17 +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
2024-02-07 01:18:17 +00:00
}
func New(db DBTX) *Queries {
return &Queries{db: db}
2024-02-07 01:18:17 +00:00
}
type Queries struct {
db DBTX
2024-02-07 01:18:17 +00:00
}
func (q *Queries) WithTx(tx *sql.Tx) *Queries {
return &Queries{
db: tx,
}
2024-02-07 01:18:17 +00:00
}