-
Notifications
You must be signed in to change notification settings - Fork 433
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
CallableStatement: using named parameters to specify only certain parameter values #553
Comments
Hi @gordthompson , |
@cheenamalhotra It looks like it is in progress for more than two years. Is there any progress? |
Hi @JaapD, we haven't been able to work on this, the team will let you know when we have an update. |
Hi @JaapD , I actually created a custom library for this. I will post the code in my github soon. |
Any update on whether this will be addressed soon? |
hi @kliakos |
As part of a large update we included migrating from JTDS to the MS JDBC driver but hit this problem in testing. This is a big issue for us so I have been looking into the possibility of providing a patch for it. I do have a proof of concept test working that will probably be suitable for our internal use but have a question before looking to take it any further publicly.
This rule doesn't currently seem to be enforced, and there is an existing unit test - StatementTest.testJdbc41CallableStatementMethods - that does mix parameters, so a little unsure what to do about that. My POC did enforce this but I took that out after seeing that test fail, so now in my experiment this test still passes, but it is not in keeping with the spec as far as I can see. |
(ref: this Stack Overflow question)
Section 13.3.2 of the JDBC 4.2 specification says
I just tried this with 6.3.4.jre8-preview.jar and I couldn't get it to work. It seemed that I had to provide a parameter placeholder for every possible parameter, (
(?,?,?,?,?,?,?,?,?,?)
in the above example), and I didn't see a way to specifyDEFAULT
for a parameter that I would have otherwise simply omitted.In other words, it seems like named parameter support for CallableStatement in mssql-jdbc is currently limited to allowing us to specify the parameters in any order, but not to "pick and choose" the parameters we actually supply.
Have I missed something?
The text was updated successfully, but these errors were encountered: