Ibatis、oracle 以及如何映射返回“列”的旧过程
我有下一个过程
CREATE OR REPLACE Package PC.PCS_Material_Pkg
As
TYPE Code_material_of_arr IS TABLE OF Number(30) INDEX BY BINARY_INTEGER;
TYPE Desc_Material_Of_arr IS TABLE OF Varchar2(240) INDEX BY BINARY_INTEGER;
Procedure PCS_Material
( SRV_Message In Out Varchar2
, In_xDesc_Material In Varchar2
, Col_Codi_material_of Out Code_material_of_arr
, Col_Desc_Material_Of Out Desc_Material_Of_arr
);
End PCS_Material_Pkg;
/
,我希望知道如何映射它(xml),至少有一些如何继续的线索。可悲的是,我无法更改过程并返回光标。
谢谢。
I have the next procedure
CREATE OR REPLACE Package PC.PCS_Material_Pkg
As
TYPE Code_material_of_arr IS TABLE OF Number(30) INDEX BY BINARY_INTEGER;
TYPE Desc_Material_Of_arr IS TABLE OF Varchar2(240) INDEX BY BINARY_INTEGER;
Procedure PCS_Material
( SRV_Message In Out Varchar2
, In_xDesc_Material In Varchar2
, Col_Codi_material_of Out Code_material_of_arr
, Col_Desc_Material_Of Out Desc_Material_Of_arr
);
End PCS_Material_Pkg;
/
And i wish to know how to map it (xml) at least some clue of how to proceed. Sadly, i can't change the procedure and return a cursor.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Ibatis通常有一个sqlMap.xml文件,您可以在其中编写所有
查询,并获得一个resultObject作为返回。
您真正需要做的就是在 xml 文件中向 Ibatis 提供 Oracle DB 驱动程序以及要运行的查询。
Could you please elaborate on the question..
Ibatis, usually has a sqlMap.xml file, in which you can write all the queries, and get a resultObject in return.
All you would really need to do is, provide Oracle DB drivers to Ibatis, and a query you want to run , in an xml file.
这是一个例子(取自另一个问题)。注意参数的模式。您将需要使用 Oracle jdbcTypes,但这应该会引导您走向正确的方向。
Here's an example (taken from another question). Note the mode of the params. You'll want to use Oracle jdbcTypes, but this should send you in the right direction.