Documentation
¶
Index ¶
- func Run[R any](ctx context.Context, creator Creator, cb func(ctx context.Context) (R, error)) (R, error)
- func RunWithNoValue(ctx context.Context, creator Creator, cb func(ctx context.Context) error) error
- func SetDriverOnContext(ctx context.Context, tx Driver) (context.Context, error)
- type Creator
- type Driver
- type DriverConflictError
- type DriverNotFoundError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run[R any](ctx context.Context, creator Creator, cb func(ctx context.Context) (R, error)) (R, error)
Runs the callback inside a transaction
func RunWithNoValue ¶
RunWithNoValue the callback inside a transaction with no return value
Types ¶
type DriverConflictError ¶
type DriverConflictError struct{}
func (*DriverConflictError) Error ¶
func (e *DriverConflictError) Error() string
type DriverNotFoundError ¶
type DriverNotFoundError struct{}
func (*DriverNotFoundError) Error ¶
func (e *DriverNotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.