ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: IBatis and Oracle stored functions
Date Tue, 04 Jan 2005 18:30:59 GMT
You can look at the Blob and ClobTypeHandlerCallback implementations
included with 2.0.9 as an example of a CTH.  As fot the getCursor
stuff, you won't have access to the PreparedStatement, but you should
be able to use getObject(1) to get the cursor back.

In the worst case scenario, 2.0.9 includes support for implementing
full TypeHandler implementations, which are harder to write, but will
give you access to the PS.

Cheers
Clinton


On Tue, 04 Jan 2005 19:05:56 +0100, Jan Vissers <Jan.Vissers@cumquat.nl> wrote:
> For instance:
> 
> ...
> CallableStatement cstmt = conn.prepareCall("{? = call pkg_refcur.f_refcur(?)}");
> cstmt.registerOutParameter(1, OracleTypes.CURSOR);
> cstmt.setString(2, i_etype);
> cstmt.executeUpdate();
> ResultSet rset = ((OracleCallableStatement)cstmt).getCursor(1);
> ...
> 
> I've seen *part* of an example for a custom type handler, but no real
> complete example including call sequence. This would help a great deal!
> 
> Thx,
> Jan.
> 
> Clinton Begin wrote:
> 
> >How would you call them from JDBC?
> >
> >iBATIS supports pretty much anything supported by the standard JDBC APIs.
> >
> >Vendor specific extensions typically require a custom type handler, or
> >may not be supportable at all.
> >
> >Clinton
> >
> >
> >On Tue, 04 Jan 2005 18:43:52 +0100, Jan Vissers <Jan.Vissers@cumquat.nl> wrote:
> >
> >
> >> Hi,
> >>
> >> I'm evaluating IBatis sqlMap/DAO wrt Oracle functionality, like:
> >>
> >>"RETURNING ... INTO ..." Clause
> >>CLOB (oracle.sql.CLOB) >32K
> >>BLOB (oracle.sql.BLOB)
> >>XMLType (oracle.xdb.XMLType)
> >>CallableStatement... It looks to me that none of these are really supported.
> >>I, for instance have a packaged function:
> >>
> >>
> >>function insert_record( p_i_values in pck2.refcursortype)
> >> return   pck2.refcursortype;
> >>
> >> Is there any way to call these types of objects from IBatis?
> >>
> >> Thx.
> >> Jan.
> >>
> >>--
> >>
> >>  And
> >>
> >>
> >
> >
> >
> 
> --
> Get Firefox! <http://www.spreadfirefox.com/?q=affiliates&id=0&t=70>
>  And    Get Thunderbird <http://www.mozilla.org/products/thunderbird/>
> 
>

Mime
View raw message