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

Provide support for JDOQL/JPQL parameter mapped to multiple SQL statement parameters #440

Open
andyjefferson opened this issue May 5, 2022 · 0 comments

Comments

@andyjefferson
Copy link
Member

If we want to have a statement like
SELECT ... FROM MYTABLE WHERE MYCOL IN (?,?,?,?,?, ...)
we could allow the input of a single JDOQL / JPQL parameter that is a Collection / array, and each element maps to a JDBC parameter.
The JDOQL could be something like
SELECT FROM mydomain.MyClass WHERE :myParam.contains(this.field)
and myParam is passed in as a Collection.

One way would be to internally name the parameters as myParam#0, myParam#1, ... myParam#N.
The benefit of this feature is very limited since it is simply trying to make the SQL statement reusable, but that only applies when the Collection has the same number of elements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant