Git Product home page Git Product logo

Comments (4)

spring-projects-issues avatar spring-projects-issues commented on May 22, 2024

Thomas Risberg commented

Does your code call setFunction(true)?

http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/jdbc/object/SqlCall.html#setFunction%28boolean%29

That's necessary if you are calling a function.

Also, anything that is part if Spring Framework should go in as a Spring JIRA issue (https://jira.springsource.org/browse/SPR). I'll move this later if necessary.

-Thomas

from spring-data-relational.

spring-projects-issues avatar spring-projects-issues commented on May 22, 2024

Catwalker Liu commented

Yes I did call setFunction(true) after these declareParameter(...)

In code line 132-152 parameterCount is set to -1 for function, but the code also exclude SqlReturnResultSet effectively. (parameterCount++ is inside of instanceof check).
This is double de-count for (function+SqlReturnResultSet) case.

from spring-data-relational.

spring-projects-issues avatar spring-projects-issues commented on May 22, 2024

Thomas Risberg commented

Yes, that is correct - SqlReturnResultSet is used with SQL Server and Sybase that return resultsets from regular stored procedure calls. Didn't think of that initially, and since you are calling a function it's not the right parameter type to use. Depending on the database your parameter would look a bit different. If you are using Oracle try the following:

declareParameter(new SqlOutParameter("rs", oracle.jdbc.OracleTypes.CURSOR, new MyMapper()));

and for Postgres you would use:

declareParameter(new SqlOutParameter("rs", Types.OTHER, new MyMapper()));

Let me know how this works out or if you are using some other database.

-Thomas

from spring-data-relational.

spring-projects-issues avatar spring-projects-issues commented on May 22, 2024

Thomas Risberg commented

I'm closing this issue. If you are still having problems you can open a new Spring Framework issue (https://jira.springsource.org/browse/SPR).

-Thomas

from spring-data-relational.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.