-
Notifications
You must be signed in to change notification settings - Fork 426
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
recognize CallableStatement parameter names with leading '@' #495
recognize CallableStatement parameter names with leading '@' #495
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #495 +/- ##
============================================
+ Coverage 46.47% 46.56% +0.08%
- Complexity 2214 2220 +6
============================================
Files 108 108
Lines 25312 25316 +4
Branches 4183 4182 -1
============================================
+ Hits 11765 11788 +23
+ Misses 11513 11498 -15
+ Partials 2034 2030 -4
Continue to review full report at Codecov.
|
Addresses issue #496 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also ran some more testing, and the changes look good. Thanks for the contribution!
@@ -1451,6 +1451,12 @@ public NClob getNClob(String parameterName) throws SQLException { | |||
if (paramNames != null) | |||
l = paramNames.size(); | |||
|
|||
// handle `@name` as well as `name`, since `@name` is what's returned | |||
// by DatabaseMetaData#getProcedureColumns | |||
if (columnName.startsWith("@")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@v-afrafi - Good point. Your change would actually have to be made in two places, so I tweaked it a bit.
Thanks @gordthompson for fixing this issue 🎉 |
When passing parameters to a CallableStatement by name, recognize names that start with '@' as reported by
DatabaseMetaData#getProcedureColumns
.(ref: Stack Overflow question here)