Documentation ¶
Index ¶
- Constants
- func DeleteBuildUndoSql(undoLog undo.SqlUndoLog) string
- func InsertBuildUndoSql(undoLog undo.SqlUndoLog) string
- func UpdateBuildUndoSql(undoLog undo.SqlUndoLog) string
- type BuildUndoSql
- type MysqlUndoExecutor
- type MysqlUndoLogManager
- func (manager MysqlUndoLogManager) BatchDeleteUndoLog(db *sql.DB, xids []string, branchIDs []int64) error
- func (manager MysqlUndoLogManager) DeleteUndoLog(db *sql.DB, xid string, branchID int64) error
- func (manager MysqlUndoLogManager) DeleteUndoLogByLogCreated(db *sql.DB, logCreated time.Time, limitRows int) (sql.Result, error)
- func (manager MysqlUndoLogManager) FlushUndoLogs(tx *proxy_tx.ProxyTx) error
- func (manager MysqlUndoLogManager) Undo(db *sql.DB, xid string, branchID int64, resourceID string) error
- type State
- type UndoLogManager
Constants ¶
View Source
const ( InsertSqlTemplate = "INSERT INTO %s (%s) VALUES (%s)" DeleteSqlTemplate = "DELETE FROM %s WHERE `%s` = ?" UpdateSqlTemplate = "UPDATE %s SET %s WHERE `%s` = ?" SelectSqlTemplate = "SELECT %s FROM %s WHERE `%s` IN %s" )
View Source
const ( DeleteUndoLogSql = "DELETE FROM undo_log WHERE xid = ? and branch_id = ?" DeleteUndoLogByCreateSql = "DELETE FROM undo_log WHERE log_created <= ? LIMIT ?" InsertUndoLogSql = `` /* 140-byte string literal not displayed */ SelectUndoLogSql = `SELECT branch_id, xid, context, rollback_info, log_status FROM undo_log WHERE branch_id = ? AND xid = ? FOR UPDATE` )
Variables ¶
This section is empty.
Functions ¶
func DeleteBuildUndoSql ¶
func DeleteBuildUndoSql(undoLog undo.SqlUndoLog) string
func InsertBuildUndoSql ¶
func InsertBuildUndoSql(undoLog undo.SqlUndoLog) string
func UpdateBuildUndoSql ¶
func UpdateBuildUndoSql(undoLog undo.SqlUndoLog) string
Types ¶
type BuildUndoSql ¶
type BuildUndoSql func(undoLog undo.SqlUndoLog) string
type MysqlUndoExecutor ¶
type MysqlUndoExecutor struct {
// contains filtered or unexported fields
}
func NewMysqlUndoExecutor ¶
func NewMysqlUndoExecutor(undoLog undo.SqlUndoLog) MysqlUndoExecutor
type MysqlUndoLogManager ¶
type MysqlUndoLogManager struct { }
func (MysqlUndoLogManager) BatchDeleteUndoLog ¶
func (MysqlUndoLogManager) DeleteUndoLog ¶
func (MysqlUndoLogManager) DeleteUndoLogByLogCreated ¶
func (MysqlUndoLogManager) FlushUndoLogs ¶
func (manager MysqlUndoLogManager) FlushUndoLogs(tx *proxy_tx.ProxyTx) error
type UndoLogManager ¶
type UndoLogManager interface { FlushUndoLogs(tx *proxy_tx.ProxyTx) error Undo(db *sql.DB, xid string, branchID int64, resourceID string) error DeleteUndoLog(db *sql.DB, xid string, branchID int64) error BatchDeleteUndoLog(db *sql.DB, xids []string, branchIDs []int64) error DeleteUndoLogByLogCreated(db *sql.DB, logCreated time.Time, limitRows int) (sql.Result, error) }
func GetUndoLogManager ¶
func GetUndoLogManager() UndoLogManager
Click to show internal directories.
Click to hide internal directories.