-
Notifications
You must be signed in to change notification settings - Fork 369
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
extract parameters and count results #674
Comments
You can send the Pull Request if you think it's useful to have it integrated. |
Well, I'm a little bit mitigated for the count part:
But maybe that's inherent to multiple aspects of this library? What do you think? |
The count part is not needed, but being able to extract the parameters would be useful. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think it would be useful to be able to extract query parameters (also auto-generated sql query parameters from a JPA criteria query, even if it has no explicit parameters).
I have some example code working, at least in my context. I also use it to count results in pure SQL (the only way IMO to cover all cases without resorting to overcomplicated code), so I also shared this below. That part is maybe more database-specific, and I don't know if it also belongs in this library.
I could make one or more pull requests if it sounds interesting enough. What are your thoughts about this?
` public long countResults(CriteriaQuery<?> query) {
return countResults(query, Object::toString);
}
The text was updated successfully, but these errors were encountered: