proxy_tx

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProxyTx

type ProxyTx struct {
	*sql.Tx
	DSN        string
	ResourceId string
	Context    *TxContext
}

func (*ProxyTx) AppendLockKey

func (tx *ProxyTx) AppendLockKey(lockKey string)

func (*ProxyTx) AppendUndoLog

func (tx *ProxyTx) AppendUndoLog(undoLog *undo.SqlUndoLog)

func (*ProxyTx) Bind

func (tx *ProxyTx) Bind(xid string)

func (*ProxyTx) GetResourceId

func (tx *ProxyTx) GetResourceId() string

func (*ProxyTx) IsGlobalLockRequire

func (tx *ProxyTx) IsGlobalLockRequire() bool

func (*ProxyTx) SetGlobalLockRequire

func (tx *ProxyTx) SetGlobalLockRequire(isLock bool)

type TxContext

type TxContext struct {
	*context.RootContext
	Xid                 string
	BranchId            int64
	IsGlobalLockRequire bool

	LockKeysBuffer     *model.Set
	SqlUndoItemsBuffer []*undo.SqlUndoLog
}

func NewTxContext

func NewTxContext(ctx *context.RootContext) *TxContext

func (*TxContext) AppendLockKey

func (ctx *TxContext) AppendLockKey(lockKey string)

func (*TxContext) AppendUndoItem

func (ctx *TxContext) AppendUndoItem(sqlUndoLog *undo.SqlUndoLog)

func (*TxContext) Bind

func (ctx *TxContext) Bind(xid string)

func (*TxContext) BuildLockKeys

func (ctx *TxContext) BuildLockKeys() string

func (*TxContext) HasUndoLog

func (ctx *TxContext) HasUndoLog() bool

func (*TxContext) InGlobalTransaction

func (ctx *TxContext) InGlobalTransaction() bool

func (*TxContext) IsBranchRegistered

func (ctx *TxContext) IsBranchRegistered() bool

func (*TxContext) Reset

func (ctx *TxContext) Reset()

Jump to

Keyboard shortcuts

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