1
mirror of https://github.com/CarmJos/EasySQL.git synced 2024-09-19 13:25:47 +00:00

feat(query): 添加 containsResult(column) 以便快速验证结果。

This commit is contained in:
Carm Jos 2023-03-15 23:07:45 +08:00
parent 4b4215fb5d
commit 6f15897eb4
7 changed files with 11 additions and 6 deletions

View File

@ -5,7 +5,7 @@
<parent>
<groupId>cc.carm.lib</groupId>
<artifactId>easysql-parent</artifactId>
<version>0.4.6</version>
<version>0.4.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,6 +5,7 @@ import cc.carm.lib.easysql.api.action.query.QueryAction;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.concurrent.TimeUnit;
@ -50,6 +51,10 @@ public interface SQLQuery extends AutoCloseable {
ResultSet getResultSet();
default boolean containsResult(String columnName) throws SQLException {
return getResultSet() != null && getResultSet().getObject(columnName) != null;
}
/**
* 得到设定的SQL语句
*

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>easysql-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>0.4.6</version>
<version>0.4.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>easysql-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>0.4.6</version>
<version>0.4.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -19,7 +19,7 @@
<groupId>cc.carm.lib</groupId>
<artifactId>easysql-parent</artifactId>
<packaging>pom</packaging>
<version>0.4.6</version>
<version>0.4.7</version>
<modules>
<module>api</module>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>easysql-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>0.4.6</version>
<version>0.4.7</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>easysql-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>0.4.6</version>
<version>0.4.7</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>