spring-framework / org.springframework.jdbc.core.namedparam / NamedParameterJdbcOperations / batchUpdate

batchUpdate

abstract fun batchUpdate(sql: String, batchValues: Array<MutableMap<String, *>>): IntArray

Executes a batch using the supplied SQL statement with the batch of supplied arguments.

Parameters

sql - the SQL statement to execute

batchValues - the array of Maps containing the batch of arguments for the query

Return
an array containing the numbers of rows affected by each update in the batch

abstract fun batchUpdate(sql: String, batchArgs: Array<SqlParameterSource>): IntArray

Execute a batch using the supplied SQL statement with the batch of supplied arguments.

Parameters

sql - the SQL statement to execute

batchArgs - the array of SqlParameterSource containing the batch of arguments for the query

Return
an array containing the numbers of rows affected by each update in the batch