mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-10-07 15:39:29 +00:00
Deprecate multi-batch batchUpdate variant in JdbcTemplate
Closes gh-37345
This commit is contained in:
@@ -1042,7 +1042,10 @@ public interface JdbcOperations {
|
||||
* {@link java.sql.Statement#SUCCESS_NO_INFO}/{@link java.sql.Statement#EXECUTE_FAILED})
|
||||
* @throws DataAccessException if there is any problem issuing the update
|
||||
* @since 3.1
|
||||
* @deprecated as of 7.1, in favor of single batchUpdate calls which execute the
|
||||
* entire batch (since modern databases do not restrict the batch size anymore)
|
||||
*/
|
||||
@Deprecated(since = "7.1")
|
||||
<T> int[][] batchUpdate(String sql, Collection<T> batchArgs, int batchSize,
|
||||
ParameterizedPreparedStatementSetter<T> pss) throws DataAccessException;
|
||||
|
||||
|
||||
@@ -1087,6 +1087,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
|
||||
});
|
||||
}
|
||||
|
||||
@Deprecated(since = "7.1")
|
||||
@Override
|
||||
public <T> int[][] batchUpdate(String sql, Collection<T> batchArgs, int batchSize,
|
||||
ParameterizedPreparedStatementSetter<T> pss) throws DataAccessException {
|
||||
|
||||
+3
-1
@@ -36,8 +36,10 @@ import java.sql.SQLException;
|
||||
* @author Thomas Risberg
|
||||
* @since 3.1
|
||||
* @param <T> the argument type
|
||||
* @see JdbcTemplate#batchUpdate(String, java.util.Collection, int, ParameterizedPreparedStatementSetter)
|
||||
* @deprecated as of 7.1, along with
|
||||
* {@link JdbcTemplate#batchUpdate(String, java.util.Collection, int, ParameterizedPreparedStatementSetter)}
|
||||
*/
|
||||
@Deprecated(since = "7.1")
|
||||
@FunctionalInterface
|
||||
public interface ParameterizedPreparedStatementSetter<T> {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user