txm

package module
v0.0.0-...-228b4ca Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

README

flygo-gobatis-txm

flygo-gobatis-txm

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CurrentContextTx = "CURRENT_CONTEXT_TX"

Functions

func Begin

func Begin(c *context.Context) *gobatis.TX

func Commit

func Commit(c *context.Context)

func CurrentBatis

func CurrentBatis(c *context.Context) *gobatis.Batis

func CurrentTX

func CurrentTX(c *context.Context) *gobatis.TX

func Error

func Error(text string) error

func Rollback

func Rollback(c *context.Context)

func TX

func TX(c *context.Context, mappers ...*gobatis.UpdateMapper)

Types

type Listener

type Listener struct {
	Batis *gobatis.Batis
}

func (*Listener) After

func (l *Listener) After(*c.Context)

func (*Listener) Before

func (l *Listener) Before(*c.Context)

func (*Listener) Created

func (l *Listener) Created(c *c.Context)

func (*Listener) Destroyed

func (l *Listener) Destroyed(*c.Context)

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func New

func New(rollbackFors ...error) *Manager

func (*Manager) Handler

func (m *Manager) Handler() func(c *c.Context)

func (*Manager) Method

func (m *Manager) Method() mw.Method

func (*Manager) Name

func (m *Manager) Name() string

func (*Manager) Pattern

func (m *Manager) Pattern() mw.Pattern

func (*Manager) Type

func (m *Manager) Type() *mw.Type

type TxError

type TxError struct {
	Err string
}

func (*TxError) Error

func (t *TxError) Error() string

Jump to

Keyboard shortcuts

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