exec

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: Apache-2.0 Imports: 18 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, lockRetryInterval time.Duration, lockRetryTimes int) (bool, error)
	GetTableMeta(ctx context.Context) (schema.TableMeta, error)
	GetTableName() string
}

func NewPrepareGlobalLockExecutor

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

func NewPrepareSelectForUpdateExecutor

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

func NewQueryGlobalLockExecutor

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

func NewQuerySelectForUpdateExecutor

func NewQuerySelectForUpdateExecutor(
	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(
	conn *driver.BackendConnection,
	stmt *ast.DeleteStmt,
	args map[string]interface{}) Executor

func NewPrepareInsertExecutor

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

func NewPrepareUpdateExecutor

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

func NewQueryDeleteExecutor

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

func NewQueryInsertExecutor

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

func NewQueryUpdateExecutor

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

Jump to

Keyboard shortcuts

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