Find the code snippet for delete operation:
override fun deleteUser(id: Int) {
val deleteQuery = "DELETE FROM users WHERE id=?"
jdbcTemplate.update(deleteQuery, id)
}
deleteQuery = "DELETE FROM users WHERE id=?" is the query to update a user from user table by using the ID. jdbcTemplate.update() will execute the query and delete the specific data.
With these functions, we have finished our repository class.