Documentation ¶
Index ¶
- Constants
- func AddEscape(colName string, dbType types.DBType) string
- func BuildWhereConditionByPKs(pkNameList []string, dbType types.DBType) string
- func DataValidationAndGoOn(sqlUndoLog undo.SQLUndoLog, conn *sql.Conn) bool
- func DelEscape(colName string, dbType types.DBType) string
- func GetOrderedPkList(image *types.RecordImage, row types.RowImage, dbType types.DBType) ([]types.ColumnImage, error)
- func IsRecordsEquals(beforeImage *types.RecordImage, afterImage *types.RecordImage) (bool, error)
- func NewMySQLUndoExecutorHolder() undo.UndoExecutorHolder
- type BaseExecutor
- type MySQLUndoExecutorHolder
Constants ¶
View Source
const ( Dot = "." EscapeStandard = "\"" EscapeMysql = "`" )
Variables ¶
This section is empty.
Functions ¶
func BuildWhereConditionByPKs ¶
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 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) 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
Click to show internal directories.
Click to hide internal directories.