transaction

package
v0.0.0-...-50d7d3f Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTnx

func GetTnx(ctx context.Context) interface{}

Types

type DummyTransaction

type DummyTransaction struct {
}

Dummy Transaction - Support Multiple Level Transaction

func (DummyTransaction) Commit

func (d DummyTransaction) Commit() error

func (DummyTransaction) Finish

func (d DummyTransaction) Finish(err error) error

func (DummyTransaction) RollBack

func (d DummyTransaction) RollBack()

type TnxManager

type TnxManager interface {
	Start(ctx context.Context) (Transaction, context.Context)
}

func NewTxManager

func NewTxManager(db *gorm.DB) TnxManager

type Transaction

type Transaction interface {
	Commit() error
	RollBack()
	Finish(err error) error
}

Jump to

Keyboard shortcuts

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