mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
dml类整理
This commit is contained in:
@@ -144,9 +144,9 @@ public class MessageUtil {
|
|||||||
dml.setTs(flatMessage.getTs());
|
dml.setTs(flatMessage.getTs());
|
||||||
dml.setEs(flatMessage.getEs());
|
dml.setEs(flatMessage.getEs());
|
||||||
dml.setSql(flatMessage.getSql());
|
dml.setSql(flatMessage.getSql());
|
||||||
if (flatMessage.getSqlType() == null || flatMessage.getMysqlType() == null) {
|
// if (flatMessage.getSqlType() == null || flatMessage.getMysqlType() == null) {
|
||||||
throw new RuntimeException("SqlType or mysqlType is null");
|
// throw new RuntimeException("SqlType or mysqlType is null");
|
||||||
}
|
// }
|
||||||
List<Map<String, String>> data = flatMessage.getData();
|
List<Map<String, String>> data = flatMessage.getData();
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
dml.setData(changeRows(data, flatMessage.getSqlType(), flatMessage.getMysqlType()));
|
dml.setData(changeRows(data, flatMessage.getSqlType(), flatMessage.getMysqlType()));
|
||||||
|
|||||||
@@ -75,6 +75,11 @@ public class RdbAdapter implements OuterAdapter {
|
|||||||
rdbMapping.put(key, mappingConfig);
|
rdbMapping.put(key, mappingConfig);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (rdbMapping.isEmpty()) {
|
||||||
|
throw new RuntimeException("No rdb adapter found for config key: " + configuration.getKey());
|
||||||
|
}
|
||||||
|
|
||||||
for (Map.Entry<String, MappingConfig> entry : rdbMapping.entrySet()) {
|
for (Map.Entry<String, MappingConfig> entry : rdbMapping.entrySet()) {
|
||||||
String configName = entry.getKey();
|
String configName = entry.getKey();
|
||||||
MappingConfig mappingConfig = entry.getValue();
|
MappingConfig mappingConfig = entry.getValue();
|
||||||
|
|||||||
Reference in New Issue
Block a user