Comment From: hantsy
When I used Spring Jdbc in my latest projects, I found the update(String sql, SqlParameterSource paramSource, KeyHolder generatedKeyHolder, String[] keyColumnNames)
lacks a variant to accept a Map
instead of the SqlParameterSource
.
This pr just add two variants to accept Map
as parameter sources when binding params to sql.
update(String sql, Map params, KeyHolder generatedKeyHolder, String[] keyColumnNames)
update(String sql, Map params, KeyHolder generatedKeyHolder)
Comment From: leeseojune53
Wow nice feature!!
Comment From: snicoll
Thanks for the PR @hantsy but when more arguments are required, we fallback on SqlParameterSource
. You can easily get one from the map by calling new MapSqlParameterSource(paramMap)
. Given how easy those methods can be called, I don't think the extra signatures are warranted.