store

package
v0.0.0-...-2ebd334 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTxContext

func NewTxContext(parent context.Context, tx *sqlx.Tx) context.Context

NewTxContext returns a new context with the given Tx attached.

func TxFromContext

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

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

Types

type Executor

type Executor interface {
	SelectContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error
	GetContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error
	squirrel.StdSqlCtx
}

type Transactor

type Transactor interface {
	RunInTx(ctx context.Context, fn func(ctx context.Context) error) (err error)
}

func NewTransactor

func NewTransactor(db *sqlx.DB) Transactor

Jump to

Keyboard shortcuts

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