Search in sources :

Example 1 with SQLType

use of io.seata.sqlparser.SQLType in project seata by seata.

the class BaseTransactionalExecutor method buildUndoItem.

/**
 * build a SQLUndoLog
 *
 * @param beforeImage the before image
 * @param afterImage  the after image
 * @return sql undo log
 */
protected SQLUndoLog buildUndoItem(TableRecords beforeImage, TableRecords afterImage) {
    SQLType sqlType = sqlRecognizer.getSQLType();
    String tableName = sqlRecognizer.getTableName();
    SQLUndoLog sqlUndoLog = new SQLUndoLog();
    sqlUndoLog.setSqlType(sqlType);
    sqlUndoLog.setTableName(tableName);
    sqlUndoLog.setBeforeImage(beforeImage);
    sqlUndoLog.setAfterImage(afterImage);
    return sqlUndoLog;
}
Also used : SQLUndoLog(io.seata.rm.datasource.undo.SQLUndoLog) SQLType(io.seata.sqlparser.SQLType)

Aggregations

SQLUndoLog (io.seata.rm.datasource.undo.SQLUndoLog)1 SQLType (io.seata.sqlparser.SQLType)1