Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javadoc for JdbcOperations.batchUpdate should mention that negative values are possible #25138

Closed
tongc opened this issue May 27, 2020 · 0 comments
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: documentation A documentation task
Milestone

Comments

@tongc
Copy link

tongc commented May 27, 2020

https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/jdbc/core/JdbcOperations.html#batchUpdate-java.lang.String...-

In the spring java doc for this method, it says "Returns: an array of the number of rows affected by each statement". This statement is misleading because "The number of rows" would never be negative.

However, this method could delegate to https://docs.oracle.com/javase/1.5.0/docs/api/java/sql/Statement.html#executeBatch() where negative values are possible, such as SUCCESS_NO_INFO/-2

The Spring javadoc should make this clear.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label May 27, 2020
@jhoeller jhoeller self-assigned this May 27, 2020
@jhoeller jhoeller added in: data Issues in data modules (jdbc, orm, oxm, tx) type: documentation A documentation task and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels May 27, 2020
@jhoeller jhoeller added this to the 5.2.7 milestone May 27, 2020
@jhoeller jhoeller changed the title Improvement: Javadoc for JdbcOperations.batchUpdate should mention negative values are possible Javadoc for JdbcOperations.batchUpdate should mention that negative values are possible May 27, 2020
FelixFly pushed a commit to FelixFly/spring-framework that referenced this issue Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: documentation A documentation task
Projects
None yet
Development

No branches or pull requests

3 participants