提交 4c08066f 编写于 作者: T terrymanu

refactor RoutingResultValidator's constructor

上级 7740d44b
...@@ -48,6 +48,7 @@ import java.util.LinkedList; ...@@ -48,6 +48,7 @@ import java.util.LinkedList;
* Routing result validator. * Routing result validator.
* *
* @author sunbufu * @author sunbufu
* @author zhangliang
*/ */
public final class RoutingResultValidator { public final class RoutingResultValidator {
...@@ -69,12 +70,8 @@ public final class RoutingResultValidator { ...@@ -69,12 +70,8 @@ public final class RoutingResultValidator {
this.metaData = metaData; this.metaData = metaData;
this.shardingStatement = shardingStatement; this.shardingStatement = shardingStatement;
this.shardingConditions = shardingConditions; this.shardingConditions = shardingConditions;
if (shardingRule.getRuleConfiguration().getMasterSlaveRuleConfigs().isEmpty()) { checkDataSource = shardingRule.getRuleConfiguration().getMasterSlaveRuleConfigs().isEmpty();
checkDataSource = true; checkTable = shardingStatement.getSQLStatement() instanceof DMLStatement;
}
if (shardingStatement.getSQLStatement() instanceof DMLStatement) {
checkTable = true;
}
} }
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册