"Jeff Butler" <[EMAIL PROTECTED]> scritti il 03/10/2006 14:59:55
> There are two different issues here.
[...]
> 2. Only use queryForObject if the function returns a result set. If
> it is just returning a single value, then call it with syntax like this:
>
> {? = call myFunction}
>
> Register an output parameter - not a resultMap - then call it with
> the "update" method.
I will investigate asap the doc and the list for the suggested approach
(a search about "output parameter" and "? =" in the pdf Developer guide has just reported no occurrences :/)
Anyway, please note that the returned value is actually a record type (a "row").
I hope that it's possible to get, via output parameters, not only simple SQL types but record types (rows) as well.
> Unfortunatley, the iBATIS stored procedure support is hard to
> understand - it makes sense if you really understand JDBC, but
> probably doesn't otherwise. The most important thing to remember is
> this - when iBATIS uses the term "result" (resultMap, resultClass,
> etc.) it ALWAYS refers to a result set. A single value returned
> from a procedure or function is NOT a result in iBATIS - it is an
> output parameter.
Right, Jeff!
I have no experience (or very little) about JDBC.
I trusted some critics and colleagues that suggest iBatis because "very useful
to approach a DB from Java code without concern for many tedious details that you have to face with direct
programming of JDBC".
Does it help (I mean for teh documentation)? I mean that ... there is one user, at least, that directly passed JDBC by.
:)
Let'me experiment.
I will report any result as soon as possible
ciao
The developer's guide does refer you to the CallableStatement documentation - and that is where the proper syntax is detailed (because it is standard syntax in JDBC). iBATIS isn't doing anything magical, it is a fairly thin wrapper over JDBC. So some JDBC knowledge will help a lot.
Jeff Butler
On 10/3/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
- Re: Stored procedures (package functions) returnin... Jeff Butler
- RE: Stored procedures (package functions) ret... Christopher . Mathrusse
- Re: Stored procedures (package functions) ret... C . Zecca
- Re: Stored procedures (package functions) ret... C . Zecca
- Re: Stored procedures (package functions)... Larry Meadors
- Re: Stored procedures (package functi... C . Zecca
- Re: Stored procedures (package fu... Larry Meadors
- Re: Stored procedures (packa... C . Zecca
- Re: Stored procedures (p... Larry Meadors
- Re: Stored procedure... C . Zecca
