fix: "Parameter index out of range"。

This commit is contained in:
Suomm 2024-04-01 20:40:30 +08:00
parent dd1e745516
commit 14f07bd7e3

View File

@ -100,7 +100,11 @@ class WrapperUtil {
if (value == null) {
// column = user_name; logic = eq; value = null
// sql: user_name = null
if (condition.checkEffective() && condition.getLogic() != null) {
String logic;
if (condition.checkEffective()
&& (logic = condition.getLogic()) != null
&& !logic.equals(SqlConsts.IS_NULL)
&& !logic.equals(SqlConsts.IS_NOT_NULL)) {
params.add(null);
}
getValues(condition.next, params);