tx

package
v0.3.21 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrepareRollback

func PrepareRollback(db *gorm.DB) (*gorm.DB, func())

func Run

func Run(db *gorm.DB, run RunnerFunc) error

Types

type Request

type Request struct {
	Transaction *gorm.DB
	Error       error
}

func New

func New(db *gorm.DB) *Request

func (*Request) Commit

func (rq *Request) Commit() error

func (*Request) Complete

func (rq *Request) Complete() error

func (*Request) Rollback

func (rq *Request) Rollback() error

type RunnerFunc

type RunnerFunc func(*gorm.DB) error

Jump to

Keyboard shortcuts

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