I have this query for my jdbcTemplate and I wanna get just the long value from the database, what should be fixed here?
String query = "SELECT size from users where name = ? AND type = ?";
long size = jdbcTemplate.query(query, new Object[]{id, type}, (rs, rowNum) ->
rs.getLong("size"));
long size = jdbcTemplate.queryForObject(query, Long.class);