mirror of
https://github.com/CarmJos/EasySQL.git
synced 2026-06-04 15:28:20 +08:00
[0.3.16] 支持 IS NULL 判断(即设定queryValue为null)。
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<artifactId>easysql-parent</artifactId>
|
<artifactId>easysql-parent</artifactId>
|
||||||
<version>0.3.15</version>
|
<version>0.3.16</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -47,9 +47,7 @@ public interface ConditionalBuilder<B extends ConditionalBuilder<B, T>, T extend
|
|||||||
|
|
||||||
B addCondition(@NotNull String columnName, @NotNull String operator, @Nullable Object queryValue);
|
B addCondition(@NotNull String columnName, @NotNull String operator, @Nullable Object queryValue);
|
||||||
|
|
||||||
default B addCondition(@NotNull String columnName, @Nullable Object queryValue) {
|
B addCondition(@NotNull String columnName, @Nullable Object queryValue);
|
||||||
return addCondition(columnName, "=", queryValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
B addCondition(@NotNull String[] columnNames, @Nullable Object[] queryValues);
|
B addCondition(@NotNull String[] columnNames, @Nullable Object[] queryValues);
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>easysql-parent</artifactId>
|
<artifactId>easysql-parent</artifactId>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<version>0.3.15</version>
|
<version>0.3.16</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>easysql-parent</artifactId>
|
<artifactId>easysql-parent</artifactId>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<version>0.3.15</version>
|
<version>0.3.16</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,16 @@ public abstract class AbstractConditionalBuilder<B extends ConditionalBuilder<B,
|
|||||||
return getThis();
|
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
|
@Override
|
||||||
public B addCondition(
|
public B addCondition(
|
||||||
@NotNull String columnName, @NotNull String operator, @Nullable Object queryValue
|
@NotNull String columnName, @NotNull String operator, @Nullable Object queryValue
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<artifactId>easysql-parent</artifactId>
|
<artifactId>easysql-parent</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>0.3.15</version>
|
<version>0.3.16</version>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>api</module>
|
<module>api</module>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>easysql-parent</artifactId>
|
<artifactId>easysql-parent</artifactId>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<version>0.3.15</version>
|
<version>0.3.16</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>easysql-parent</artifactId>
|
<artifactId>easysql-parent</artifactId>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<version>0.3.15</version>
|
<version>0.3.16</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
Reference in New Issue
Block a user