exec

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildUndoItem

func BuildUndoItem(
	isBinary bool,
	sqlType constant.SQLType,
	schemaName, tableName,
	lockKey string, beforeImage,
	afterImage *schema.TableRecords) *undolog.SqlUndoLog

Types

type Executable

type Executable interface {
	Executable(ctx context.Context, xid string, lockRetryInterval time.Duration, lockRetryTimes int) (bool, error)
	GetTableMeta(ctx context.Context) (schema.TableMeta, error)
	GetTableName() string
}

func NewPrepareSelectForUpdateExecutor

func NewPrepareSelectForUpdateExecutor(
	appid string,
	conn *driver.BackendConnection,
	stmt *ast.SelectStmt,
	args map[string]interface{},
	result proto.Result) Executable

func NewQuerySelectForUpdateExecutor

func NewQuerySelectForUpdateExecutor(
	appid string,
	conn *driver.BackendConnection,
	stmt *ast.SelectStmt,
	result proto.Result) Executable

type Executor

type Executor interface {
	BeforeImage(ctx context.Context) (*schema.TableRecords, error)
	AfterImage(ctx context.Context) (*schema.TableRecords, error)
	GetTableMeta(ctx context.Context) (schema.TableMeta, error)
	GetTableName() string
}

func NewPrepareDeleteExecutor

func NewPrepareDeleteExecutor(
	appid string,
	conn *driver.BackendConnection,
	stmt *ast.DeleteStmt,
	args map[string]interface{}) Executor

func NewPrepareInsertExecutor

func NewPrepareInsertExecutor(
	appid string,
	conn *driver.BackendConnection,
	stmt *ast.InsertStmt,
	args map[string]interface{},
	result proto.Result) Executor

func NewPrepareUpdateExecutor

func NewPrepareUpdateExecutor(
	appid string,
	conn *driver.BackendConnection,
	stmt *ast.UpdateStmt,
	args map[string]interface{},
	beforeImage *schema.TableRecords) Executor

func NewQueryDeleteExecutor

func NewQueryDeleteExecutor(
	appid string,
	conn *driver.BackendConnection,
	stmt *ast.DeleteStmt) Executor

func NewQueryInsertExecutor

func NewQueryInsertExecutor(
	appid string,
	conn *driver.BackendConnection,
	stmt *ast.InsertStmt,
	result proto.Result) Executor

func NewQueryUpdateExecutor

func NewQueryUpdateExecutor(
	appid string,
	conn *driver.BackendConnection,
	stmt *ast.UpdateStmt,
	beforeImage *schema.TableRecords) Executor

type GlobalLockExecutor added in v0.2.2

type GlobalLockExecutor interface {
	Executable(ctx context.Context, lockRetryInterval time.Duration, lockRetryTimes int) (bool, error)
	GetTableMeta(ctx context.Context) (schema.TableMeta, error)
	GetTableName() string
}

func NewPrepareGlobalLockExecutor

func NewPrepareGlobalLockExecutor(
	appid string,
	conn *driver.BackendConnection,
	isUpdate bool,
	deleteStmt *ast.DeleteStmt,
	updateStmt *ast.UpdateStmt,
	args map[string]interface{}) GlobalLockExecutor

func NewQueryGlobalLockExecutor

func NewQueryGlobalLockExecutor(
	appid string,
	conn *driver.BackendConnection,
	isUpdate bool,
	deleteStmt *ast.DeleteStmt,
	updateStmt *ast.UpdateStmt) GlobalLockExecutor

Jump to

Keyboard shortcuts

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