Documentation ¶
Index ¶
- func Committed(ctx context.Context, f func(ctx context.Context))
- func Exec(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
- func Middleware(db DB) func(h http.Handler) http.Handler
- func NewContext(ctx context.Context, db DB) context.Context
- func Query(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
- func QueryRow(ctx context.Context, query string, args ...interface{}) *sql.Row
- func RunInTx(ctx context.Context, f func(ctx context.Context) error) error
- type DB
- type Queryer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶
Middleware injects db into request's context
func NewContext ¶
NewContext creates new context
Types ¶
Click to show internal directories.
Click to hide internal directories.