fix: 修复 QueryColumn.between_(values) 不能为 null 的问题

This commit is contained in:
Michael Yang 2025-09-26 12:02:26 +08:00
parent d5d7c3e250
commit efd2a442d4

View File

@ -510,10 +510,16 @@ public class QueryColumn implements CloneSupport<QueryColumn>, Conditional<Query
} }
QueryCondition between_(Object[] values) { QueryCondition between_(Object[] values) {
if (values == null || values.length != 2) { // if (values == null || values.length != 2) {
throw new IllegalArgumentException("values is null or length is not 2"); // throw new IllegalArgumentException("values is null or length is not 2");
// }
if (values == null || values.length == 0) {
return QueryCondition.createEmpty();
} }
Object start = values[0], end = values[1];
Object start = values[0], end = values.length > 1 ? values[1] : null;
return between_(start, end); return between_(start, end);
} }