Help us shape the future of Go! Take the 2026 Go Developer Survey

executor

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: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Dot            = "."
	EscapeStandard = "\""
	EscapeMysql    = "`"
)

Variables

This section is empty.

Functions

func AddEscape

func AddEscape(colName string, dbType types.DBType) string

AddEscape if necessary, add escape by db type

func BuildWhereConditionByPKs

func BuildWhereConditionByPKs(pkNameList []string, dbType types.DBType) string

BuildWhereConditionByPKs each pk is a condition.the result will like :" id =? and userCode =?"

func DataValidationAndGoOn

func DataValidationAndGoOn(sqlUndoLog undo.SQLUndoLog, conn *sql.Conn) bool

DataValidationAndGoOn check data valid Todo implement dataValidationAndGoOn

func DelEscape

func DelEscape(colName string, dbType types.DBType) string

DelEscape del escape by db type

func GetOrderedPkList

func GetOrderedPkList(image *types.RecordImage, row types.RowImage, dbType types.DBType) ([]types.ColumnImage, error)

func IsRecordsEquals

func IsRecordsEquals(beforeImage *types.RecordImage, afterImage *types.RecordImage) (bool, error)

IsRecordsEquals check before record and after record if equal

func NewMySQLUndoExecutorHolder

func NewMySQLUndoExecutorHolder() undo.UndoExecutorHolder

Types

type BaseExecutor

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

func (*BaseExecutor) ExecuteOn

func (b *BaseExecutor) ExecuteOn(ctx context.Context, dbType types.DBType, conn *sql.Conn) error

ExecuteOn

func (*BaseExecutor) UndoPrepare

func (b *BaseExecutor) UndoPrepare(undoPST *sql.Stmt, undoValues []types.ColumnImage, pkValueList []types.ColumnImage)

UndoPrepare

type MySQLUndoExecutorHolder

type MySQLUndoExecutorHolder struct {
}

func (*MySQLUndoExecutorHolder) GetDeleteExecutor

func (m *MySQLUndoExecutorHolder) GetDeleteExecutor(sqlUndoLog undo.SQLUndoLog) undo.UndoExecutor

GetDeleteExecutor get the mysql Delete UndoExecutor by sqlUndoLog

func (*MySQLUndoExecutorHolder) GetInsertExecutor

func (m *MySQLUndoExecutorHolder) GetInsertExecutor(sqlUndoLog undo.SQLUndoLog) undo.UndoExecutor

GetInsertExecutor get the mysql Insert UndoExecutor by sqlUndoLog

func (*MySQLUndoExecutorHolder) GetUpdateExecutor

func (m *MySQLUndoExecutorHolder) GetUpdateExecutor(sqlUndoLog undo.SQLUndoLog) undo.UndoExecutor

GetUpdateExecutor get the mysql Update UndoExecutor by sqlUndoLog

Jump to

Keyboard shortcuts

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