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

SimpleJdbcCall - Provide flexibility when building the call string [SPR-17065] #21603

Open
spring-projects-issues opened this issue Jul 18, 2018 · 0 comments
Labels
in: data type: enhancement

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Jul 18, 2018

Alexandru-Constantin Bledea opened SPR-17065 and commented

Currently SimpleJdbcCall allows overriding the call string by overriding getCallString() but it would be great if there was a way to intercept the building of this string.

Not sure if there is a better way, but when using SimpleJdbcCall, if we want to use a oracle pipelined function we have to wrap the call into a table call.

Currently my PipelineEnabledSimpleJdbcCall has the implementation

 

public String getCallString() {
    String callString = super.getCallString();
    if (functionTypePipelined && callString != null && callString.startsWith("{call ") && callString.endsWith("{")){
         String rawCall = callString.substring(6, callString.length() - 1);
         return "SELECT * FROM TABLE(" + rawCall + ")";
    }
    return callString;
} 

 

It would be great if we had a buildQuery(Params... parameters) method that would allow me to build the call that i want without hacking it like i'm doing now. AbstractJdbcCall has some good logic that tells us which parameters are ignored and which ones aren't so it would be great if we could just send in the parameters that we really care about.

 


No further details from SPR-17065

@spring-projects-issues spring-projects-issues added in: data type: enhancement labels Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data type: enhancement
Projects
None yet
Development

No branches or pull requests

1 participant