提交 ccf8a6ee authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Use Mode.getEnum() instead of comparison with slower Mode.getOracle()

上级 30246a74
...@@ -345,10 +345,6 @@ public class Mode { ...@@ -345,10 +345,6 @@ public class Mode {
return MODES.get(StringUtils.toUpperEnglish(name)); return MODES.get(StringUtils.toUpperEnglish(name));
} }
public static Mode getOracle() {
return getInstance(ModeEnum.Oracle.name());
}
public static Mode getRegular() { public static Mode getRegular() {
return getInstance(ModeEnum.REGULAR.name()); return getInstance(ModeEnum.REGULAR.name());
} }
......
...@@ -1315,7 +1315,7 @@ public class Function extends Expression implements FunctionCall { ...@@ -1315,7 +1315,7 @@ public class Function extends Expression implements FunctionCall {
} }
case REPLACE: { case REPLACE: {
if (v0 == ValueNull.INSTANCE || v1 == ValueNull.INSTANCE if (v0 == ValueNull.INSTANCE || v1 == ValueNull.INSTANCE
|| v2 == ValueNull.INSTANCE && database.getMode() != Mode.getOracle()) { || v2 == ValueNull.INSTANCE && database.getMode().getEnum() != Mode.ModeEnum.Oracle) {
result = ValueNull.INSTANCE; result = ValueNull.INSTANCE;
} else { } else {
String s0 = v0.getString(); String s0 = v0.getString();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论