mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
Message转Dml对null值的判断
This commit is contained in:
@@ -76,11 +76,15 @@ public class MessageUtil {
|
||||
dml.getPkNames().add(column.getName());
|
||||
}
|
||||
}
|
||||
if (column.getIsNull()) {
|
||||
row.put(column.getName(), null);
|
||||
} else {
|
||||
row.put(column.getName(),
|
||||
JdbcTypeUtil.typeConvert(dml.getTable(), column.getName(),
|
||||
column.getValue(),
|
||||
column.getSqlType(),
|
||||
column.getMysqlType()));
|
||||
}
|
||||
// 获取update为true的字段
|
||||
if (column.getUpdated()) {
|
||||
updateSet.add(column.getName());
|
||||
|
||||
Reference in New Issue
Block a user