forked from plusone/simple-jdbc
新增查询 boolean 的方法,并简单重构代码。
This commit is contained in:
@@ -285,6 +285,22 @@ interface JdbcOperations {
|
||||
Optional<BigDecimal> queryFirstBigDecimal(String sql)
|
||||
throws SQLException;
|
||||
|
||||
/**
|
||||
* 查询结果,并转换为 boolean
|
||||
*
|
||||
* @param sql SQL
|
||||
*/
|
||||
boolean queryAsBoolean(String sql)
|
||||
throws SQLException;
|
||||
|
||||
/**
|
||||
* 查询结果,并转换为 boolean
|
||||
*
|
||||
* @param sql SQL
|
||||
*/
|
||||
boolean queryAsBoolean(String sql, Object[] params)
|
||||
throws SQLException;
|
||||
|
||||
// #endregion
|
||||
|
||||
// #region - update & batchUpdate
|
||||
|
Reference in New Issue
Block a user