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

Do we want to support a boolean return value for @Query("UPDATE... ? #925

Open
njr-11 opened this issue Jan 6, 2025 · 2 comments
Open
Labels
design Improvements or additions to design documentation Improvements or additions to documentation enhancement New feature or request
Milestone

Comments

@njr-11
Copy link
Contributor

njr-11 commented Jan 6, 2025

Currently the Query Javadoc requires void, int, or long.

A TCK test was testing a boolean return type, but is being changed in #924 as the resolution to challenge #923 because the Javadoc does not currently permit boolean.

boolean would be trivial to implement, with true corresponding to a numeric result > 0, and false corresponding to a numeric result of 0.

boolean could be convenient when writing an DELETE or UPDATE statement (such as the one in the TCK) where there can be at most 1 matching entity, often due to querying based on the Id.

I'm fine with adding boolean, but the spec is also okay without it.

@njr-11 njr-11 added documentation Improvements or additions to documentation enhancement New feature or request design Improvements or additions to design labels Jan 6, 2025
@njr-11 njr-11 added this to the 1.1 milestone Jan 6, 2025
@gavinking
Copy link
Contributor

I implemented it. (I guess because the TCK wanted me to, I don't actually recall.) But I don't see it as something that we need to require.

@otaviojava
Copy link
Contributor

In my case, I did this mainly because the TCK, once the majority of the NoSQL databases, works with eventual persistence, thus as fewer options to update are better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Improvements or additions to design documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants