base

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// UndoLogStatusNormal This state can be properly rolled back by services
	UndoLogStatusNormal = iota
	// UndoLogStatusGlobalFinished This state prevents the branch transaction from inserting undo_log after the global transaction is rolled back.
	UndoLogStatusGlobalFinished
)

undo log status

Variables

This section is empty.

Functions

func Int64Slice2Str

func Int64Slice2Str(values interface{}, sep string) (string, error)

Int64Slice2Str

Types

type BaseUndoLogManager

type BaseUndoLogManager struct{}

BaseUndoLogManager

func NewBaseUndoLogManager

func NewBaseUndoLogManager() *BaseUndoLogManager

func (*BaseUndoLogManager) BatchDeleteUndoLog

func (m *BaseUndoLogManager) BatchDeleteUndoLog(xid []string, branchID []int64, conn *sql.Conn) error

BatchDeleteUndoLog exec delete undo log operate

func (*BaseUndoLogManager) DBType

func (m *BaseUndoLogManager) DBType() types.DBType

DBType

func (*BaseUndoLogManager) DeleteUndoLog

func (m *BaseUndoLogManager) DeleteUndoLog(ctx context.Context, xid string, branchID int64, conn *sql.Conn) error

DeleteUndoLog exec delete single undo log operate

func (*BaseUndoLogManager) FlushUndoLog

func (m *BaseUndoLogManager) FlushUndoLog(tranCtx *types.TransactionContext, conn driver.Conn) error

FlushUndoLog flush undo log

func (*BaseUndoLogManager) HasUndoLogTable

func (m *BaseUndoLogManager) HasUndoLogTable(ctx context.Context, conn *sql.Conn) (res bool, err error)

HasUndoLogTable check undo log table if exist

func (*BaseUndoLogManager) Init

func (m *BaseUndoLogManager) Init()

Init

func (*BaseUndoLogManager) InsertUndoLog

func (m *BaseUndoLogManager) InsertUndoLog(record undo.UndologRecord, conn driver.Conn) error

InsertUndoLog

func (*BaseUndoLogManager) InsertUndoLogWithSqlConn

func (m *BaseUndoLogManager) InsertUndoLogWithSqlConn(ctx context.Context, record undo.UndologRecord, conn *sql.Conn) error

func (*BaseUndoLogManager) RunUndo

func (m *BaseUndoLogManager) RunUndo(ctx context.Context, xid string, branchID int64, conn *sql.DB, dbName string) error

RunUndo undo sql

func (*BaseUndoLogManager) Undo

func (m *BaseUndoLogManager) Undo(ctx context.Context, dbType types.DBType, xid string, branchID int64, db *sql.DB, dbName string) (err error)

Undo undo sql

func (*BaseUndoLogManager) UnmarshalContext

func (m *BaseUndoLogManager) UnmarshalContext(undoContext []byte) (map[string]string, error)

Jump to

Keyboard shortcuts

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