builder

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

Documentation

Index

Constants

View Source
const (
	OnlyCareUpdateColumns = true
)
View Source
const (
	SqlPlaceholder = "?"
)

Variables

This section is empty.

Functions

func GetMySQLDeleteUndoLogBuilder

func GetMySQLDeleteUndoLogBuilder() undo.UndoLogBuilder

func GetMySQLInsertOnDuplicateUndoLogBuilder

func GetMySQLInsertOnDuplicateUndoLogBuilder() undo.UndoLogBuilder

func GetMySQLInsertUndoLogBuilder

func GetMySQLInsertUndoLogBuilder() undo.UndoLogBuilder

func GetMySQLMultiDeleteUndoLogBuilder

func GetMySQLMultiDeleteUndoLogBuilder() undo.UndoLogBuilder

func GetMySQLMultiUndoLogBuilder

func GetMySQLMultiUndoLogBuilder() undo.UndoLogBuilder

func GetMySQLMultiUpdateUndoLogBuilder

func GetMySQLMultiUpdateUndoLogBuilder() undo.UndoLogBuilder

func GetMySQLUpdateUndoLogBuilder

func GetMySQLUpdateUndoLogBuilder() undo.UndoLogBuilder

Types

type BasicUndoLogBuilder

type BasicUndoLogBuilder struct{}

todo the executor should be stateful

func (*BasicUndoLogBuilder) GetScanSlice

func (*BasicUndoLogBuilder) GetScanSlice(columnNames []string, tableMeta *types.TableMeta) []driver.Value

GetScanSlice get the column type for scann todo to use ColumnInfo get slice

type MySQLDeleteUndoLogBuilder

type MySQLDeleteUndoLogBuilder struct {
	BasicUndoLogBuilder
}

func (*MySQLDeleteUndoLogBuilder) AfterImage

func (u *MySQLDeleteUndoLogBuilder) AfterImage(ctx context.Context, execCtx *types.ExecContext, beforImages []*types.RecordImage) ([]*types.RecordImage, error)

func (*MySQLDeleteUndoLogBuilder) BeforeImage

func (u *MySQLDeleteUndoLogBuilder) BeforeImage(ctx context.Context, execCtx *types.ExecContext) ([]*types.RecordImage, error)

func (*MySQLDeleteUndoLogBuilder) GetExecutorType

func (u *MySQLDeleteUndoLogBuilder) GetExecutorType() types.ExecutorType

type MySQLInsertOnDuplicateUndoLogBuilder

type MySQLInsertOnDuplicateUndoLogBuilder struct {
	MySQLInsertUndoLogBuilder
	BeforeSelectSql           string
	Args                      []driver.Value
	BeforeImageSqlPrimaryKeys map[string]bool
}

func (*MySQLInsertOnDuplicateUndoLogBuilder) AfterImage

func (u *MySQLInsertOnDuplicateUndoLogBuilder) AfterImage(ctx context.Context, execCtx *types.ExecContext, beforeImages []*types.RecordImage) ([]*types.RecordImage, error)

func (*MySQLInsertOnDuplicateUndoLogBuilder) BeforeImage

func (*MySQLInsertOnDuplicateUndoLogBuilder) GetExecutorType

type MySQLInsertUndoLogBuilder

type MySQLInsertUndoLogBuilder struct {
	BasicUndoLogBuilder
	// InsertResult after insert sql
	InsertResult  types.ExecResult
	IncrementStep int
}

func (*MySQLInsertUndoLogBuilder) AfterImage

func (u *MySQLInsertUndoLogBuilder) AfterImage(ctx context.Context, execCtx *types.ExecContext, beforeImages []*types.RecordImage) ([]*types.RecordImage, error)

func (*MySQLInsertUndoLogBuilder) BeforeImage

func (u *MySQLInsertUndoLogBuilder) BeforeImage(ctx context.Context, execCtx *types.ExecContext) ([]*types.RecordImage, error)

func (*MySQLInsertUndoLogBuilder) GetExecutorType

func (u *MySQLInsertUndoLogBuilder) GetExecutorType() types.ExecutorType

type MySQLMultiDeleteUndoLogBuilder

type MySQLMultiDeleteUndoLogBuilder struct {
	BasicUndoLogBuilder
}

func (*MySQLMultiDeleteUndoLogBuilder) AfterImage

func (u *MySQLMultiDeleteUndoLogBuilder) AfterImage(ctx context.Context, execCtx *types.ExecContext, beforeImages []*types.RecordImage) ([]*types.RecordImage, error)

func (*MySQLMultiDeleteUndoLogBuilder) BeforeImage

func (*MySQLMultiDeleteUndoLogBuilder) GetExecutorType

func (u *MySQLMultiDeleteUndoLogBuilder) GetExecutorType() types.ExecutorType

type MySQLMultiUndoLogBuilder

type MySQLMultiUndoLogBuilder struct {
	BasicUndoLogBuilder
	// contains filtered or unexported fields
}

func (*MySQLMultiUndoLogBuilder) AfterImage

func (u *MySQLMultiUndoLogBuilder) AfterImage(ctx context.Context, execCtx *types.ExecContext, beforeImages []*types.RecordImage) ([]*types.RecordImage, error)

func (*MySQLMultiUndoLogBuilder) BeforeImage

func (u *MySQLMultiUndoLogBuilder) BeforeImage(ctx context.Context, execCtx *types.ExecContext) ([]*types.RecordImage, error)

func (*MySQLMultiUndoLogBuilder) GetExecutorType

func (u *MySQLMultiUndoLogBuilder) GetExecutorType() types.ExecutorType

type MySQLMultiUpdateUndoLogBuilder

type MySQLMultiUpdateUndoLogBuilder struct {
	BasicUndoLogBuilder
}

func (*MySQLMultiUpdateUndoLogBuilder) AfterImage

func (u *MySQLMultiUpdateUndoLogBuilder) AfterImage(ctx context.Context, execCtx *types.ExecContext, beforeImages []*types.RecordImage) ([]*types.RecordImage, error)

func (*MySQLMultiUpdateUndoLogBuilder) BeforeImage

func (*MySQLMultiUpdateUndoLogBuilder) GetExecutorType

func (u *MySQLMultiUpdateUndoLogBuilder) GetExecutorType() types.ExecutorType

type MySQLUpdateUndoLogBuilder

type MySQLUpdateUndoLogBuilder struct {
	BasicUndoLogBuilder
}

func (*MySQLUpdateUndoLogBuilder) AfterImage

func (u *MySQLUpdateUndoLogBuilder) AfterImage(ctx context.Context, execCtx *types.ExecContext, beforeImages []*types.RecordImage) ([]*types.RecordImage, error)

func (*MySQLUpdateUndoLogBuilder) BeforeImage

func (u *MySQLUpdateUndoLogBuilder) BeforeImage(ctx context.Context, execCtx *types.ExecContext) ([]*types.RecordImage, error)

func (*MySQLUpdateUndoLogBuilder) GetExecutorType

func (u *MySQLUpdateUndoLogBuilder) GetExecutorType() types.ExecutorType

Jump to

Keyboard shortcuts

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