mirror of
https://github.com/CarmJos/EasySQL.git
synced 2026-06-04 07:18:23 +08:00
[0.3.16] 支持 IS NULL 判断(即设定queryValue为null)。
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>easysql-parent</artifactId>
|
||||
<groupId>cc.carm.lib</groupId>
|
||||
<version>0.3.15</version>
|
||||
<version>0.3.16</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -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