transaction

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithTransaction added in v1.2.0

func WithTransaction(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.

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) 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