新增查询 boolean 的方法,并简单重构代码。

This commit is contained in:
2024-12-22 23:04:28 +08:00
parent 01fda84276
commit ce86d97e38
4 changed files with 214 additions and 81 deletions

View File

@@ -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