transaction

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Helper

type Helper struct {
	*sqlx.DB
	// contains filtered or unexported fields
}

func New

func New(db *sqlx.DB, loggingPrefix, tracingServiceName string) Helper

func (*Helper) WithTracedTransaction added in v1.1.0

func (p *Helper) WithTracedTransaction(tag string, db *sqlx.DB, fn func(tx *sqlx.Tx) error) (err error)

Ends the given transaction. This method will either commit the transaction if the given recoverValue is nil, or rollback the transaction if it is non nil.

func (*Helper) WithTransaction

func (p *Helper) WithTransaction(tag string, fn func(tx *sqlx.Tx) error) error

Jump to

Keyboard shortcuts

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