transactor

package
v0.0.0-...-9db48c8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractTx

func ExtractTx(ctx context.Context) *sqlx.Tx

func InjectTx

func InjectTx(ctx context.Context, tx *sqlx.Tx) context.Context

Types

type Transactor

type Transactor struct {
	// contains filtered or unexported fields
}

func New

func New(db *sqlx.DB) *Transactor

func (*Transactor) WithinTransaction

func (tr *Transactor) WithinTransaction(
	ctx context.Context,
	f func(ctx context.Context) error,
) error

TODO: add transaction options

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL