dbx

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InBBoltTransactionScope

func InBBoltTransactionScope(ctx context.Context, db *bbolt.DB, transactionScope func(ctx context.Context, tx *bbolt.Tx) error) (retErr error)

func InBBoltTransactionScopeWithResult

func InBBoltTransactionScopeWithResult[T any](ctx context.Context, db *bbolt.DB, transactionScope func(ctx context.Context, tx *bbolt.Tx) (T, error)) (result T, err error)

func InTransactionScopeWithResult

func InTransactionScopeWithResult[T any](ctx context.Context, transactionScoper TransactionScoper, transactionScope func(ctx context.Context) (T, error)) (result T, err error)

Types

type TransactionScoper

type TransactionScoper interface {
	InTransactionScope(ctx context.Context, transactionScope func(ctx context.Context) error) error
}

func NewBBoltTransactionScoper

func NewBBoltTransactionScoper(db *bbolt.DB) TransactionScoper

Jump to

Keyboard shortcuts

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