spring-projects / spring-projects/spring-framework
Support optional parameters in stored procedures
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 60.2k
- Forks
- 38.8k
- Avg merge
- 5d 2h
- Merged PRs (30d)
- 27
Description
As per https://stackoverflow.com/questions/13162043/spring-simplejdbccall-default-optional-arguments there seems to be no straightforward way to call stored procedure with optional parameters.
I would expect there to be something like SqlDefaultParamaterValue for explicit binding to default value (in SQL Server this would generate DEFAULT).
Additionally SimpleJdbcCall should do it automatically for missing parameters based on metadata (COLUMN_DEF)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the SimpleJdbcCall entry point and the stored-procedure parameter metadata described in the issue. Review the referenced Stack Overflow example and SQL Server's DEFAULT behavior, then define how explicit default binding and missing parameters from COLUMN_DEF should work. Done means optional parameters can be called without supplying values while preserving existing calls.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, sql
- Domain
- database
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100