gorm

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitFunc added in v0.0.7

type CommitFunc func() error

type RollbackFunc added in v0.0.7

type RollbackFunc func() error

type TransactionDb

type TransactionDb struct {
	*gorm.DB
	// contains filtered or unexported fields
}

func NewTransactionDb

func NewTransactionDb(db *gorm.DB) *TransactionDb

NewTransactionDb create a wrapper which implements uow.Txn

func (*TransactionDb) Begin

func (t *TransactionDb) Begin(opt ...*sql.TxOptions) (uow.Txn, error)

func (*TransactionDb) Commit

func (t *TransactionDb) Commit() error

func (*TransactionDb) Rollback

func (t *TransactionDb) Rollback() error

Jump to

Keyboard shortcuts

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