You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To add batch updating support to NamedParameterJdbcTemplate, the following method could be added to it:
public void batchUpdate(String sql, NamedParameterBatchPreparedStatementSetter npbpss) throws DataAccessException
NamedParameterBatchPreparedStatementSetter would be a new Interface that behaves like BatchPreparedStatement except that its setValues method would look like the following:
public void setValues(PreparedStatement ps, Map<String, Object[]> paramMap)
paramMap would contain the parameter name as the key, and an array of objects to substitute as the value
I added two batchUpdate methods - one takes an array of Maps containing the batch parameter values; the other one takes an array of SqlParameterSource objects for the batch.
Mark St. John opened SPR-3322 and commented
To add batch updating support to NamedParameterJdbcTemplate, the following method could be added to it:
public void batchUpdate(String sql, NamedParameterBatchPreparedStatementSetter npbpss) throws DataAccessException
NamedParameterBatchPreparedStatementSetter would be a new Interface that behaves like BatchPreparedStatement except that its setValues method would look like the following:
public void setValues(PreparedStatement ps, Map<String, Object[]> paramMap)
paramMap would contain the parameter name as the key, and an array of objects to substitute as the value
Issue Links:
Referenced from: commits 4105957, 0d5c9c1, f4e75de
1 votes, 2 watchers
The text was updated successfully, but these errors were encountered: