Created
August 9, 2022 11:34
-
-
Save saqibmehmoodgit/f49d9c9d74e4e8fd949ab083eb29c311 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Interface BatchPreparedStatementSetter | |
int getBatchSize() | |
void setValues(PreparedStatement ps, int i) | |
return this.jdbcTemplate.batchUpdate( | |
"update books set firstName = ? where id = ?", | |
new BatchPreparedStatementSetter() { | |
public void setValues(PreparedStatement ps, int i) | |
throws SQLException { | |
ps.setLong( 1, student.get(i).getId()); | |
} | |
public int getBatchSize() { | |
return student.size(); | |
} }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment