mirror of
https://github.com/CarmJos/EasySQL.git
synced 2026-06-05 00:25:32 +08:00
[0.3.16] 支持 IS NULL 判断(即设定queryValue为null)。
This commit is contained in:
@@ -48,6 +48,16 @@ public abstract class AbstractConditionalBuilder<B extends ConditionalBuilder<B,
|
||||
return getThis();
|
||||
}
|
||||
|
||||
@Override
|
||||
public B addCondition(@NotNull String columnName, @Nullable Object queryValue) {
|
||||
Objects.requireNonNull(columnName, "columnName could not be null");
|
||||
if (queryValue == null) {
|
||||
return addCondition(withBackQuote(columnName) + " IS NULL");
|
||||
} else {
|
||||
return addCondition(columnName, "=", queryValue);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public B addCondition(
|
||||
@NotNull String columnName, @NotNull String operator, @Nullable Object queryValue
|
||||
|
||||
Reference in New Issue
Block a user