This commit is contained in:
2023-02-26 13:49:09 +08:00
5 changed files with 12 additions and 12 deletions

View File

@@ -68,13 +68,13 @@ public abstract class PlusoneJdbcDaoSupport {
return queryForStream(sql, new MapSqlParameterSource(paramName, value), elementType);
}
protected final boolean queryExists(String sql, SqlParameterSource parameterSource) {
Boolean isExists = this.jdbc.queryForObject(sql, parameterSource, Boolean.TYPE);
return Boolean.TRUE.equals(isExists);
protected final boolean queryForBool(String sql, SqlParameterSource parameterSource) {
Boolean result = this.jdbc.queryForObject(sql, parameterSource, Boolean.TYPE);
return Boolean.TRUE.equals(result);
}
protected final boolean queryExists(String sql, String paramName, Object value) {
return queryExists(sql, new MapSqlParameterSource(paramName, value));
protected final boolean queryForBool(String sql, String paramName, Object value) {
return queryForBool(sql, new MapSqlParameterSource(paramName, value));
}
protected final int update(String sql, SqlParameterSource parameterSource) {