ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niels Beekman" <n.beek...@wis.nl>
Subject RE: calling stored functions
Date Wed, 01 Feb 2006 18:13:24 GMT
Hi,

The usage of "?" is AFAIK not related to the <procedure>-tag, but just
general iBATIS syntax, you can use two ways of passing parameters to
queries:

- use the parameterMap-attribute and ?'s, the order in the parametermap
is the order iBATIS uses to "populate" the ?'s
- use the parameterClass-attribute and #'s

But I could be wrong about special procedure syntax, because I don't use
them, guess I'm a spectator after all too :)

Niels

-----Original Message-----
From: Ted Schrader [mailto:tschrader@gmail.com] 
Sent: woensdag 1 februari 2006 18:33
To: user-java@ibatis.apache.org
Subject: Re: calling stored functions

Hi Mike,

I'm simply a spectator on this one, but I'm a bit puzzled about
something in your example.  You wrote:
----
<parameterMap id="myParamMap" class="map" >
       <parameter property="result" jdbcType="ORACLECURSOR" mode="OUT"/>
       <parameter property="userId" jdbcType="NUMERIC" mode="IN"/>
 </parameterMap>

<procedure id="mycursorfunction" parameterMap="myParamMap"
resultMap="myResultMap" >
        { ? = call myRefCursorFunction(? ) }
 </procedure>
----

Based on your parameter map config (and perhaps some inexperience on
my part), I'd expect your procedure to be:

<procedure id="mycursorfunction" parameterMap="myParamMap"
resultMap="myResultMap" >
        { #result# = call myRefCursorFunction(#userId#) }
 </procedure>

Is the usage of "?", (and the curly brackets, for that matter)
specific to the <procedure> tag, or perhaps an Oracle thing?

Thanks,

Ted

Mime
View raw message