Re: oXml DB Question

Martin Klang <[email protected]> Tue, 7 Feb 2006 14:51:16 +0000
Newsgroups gmane.text.xml.o-xml
Message-ID <[email protected]>
Michael,

I've not tried using cursors, I'll give it a go with MySQL later to  
see what results I get.
OUT and INOUT parameters aren't supported currently with the db  
extensions.

Functions can be used as part of normal select statements, so if you  
can do
 > select codex.main.add_search_folder(a, b, c) from dual;
then you should be able to do:

   <db:query name="createSearchFolder" connection="dev1">
     <db:param name="in_show" type="String"/>
     <db:param name="in_folder" type="String"/>
     <db:sql>
        select codex.main.add_search_folder({$in_show}, 
{$in_folder},NULL) as pk_search, {$in_show} as out_show, {$in_folder}  
as out_folder from dual
     </db:sql>
     <db:result>
       <add_folder in_show="{$out_show}" in_folder="{$out_folder}"> 
{$pk_search}</add_folder>
     </db:result>
   </db:query>

what you can try to do is first figure out what the right Oracle SQL  
query is and check the result column names. You can then use the  
column names in the db:result template. That should usually work,  
since db:result operates on the result set regardless how it was  
produced (select query, procedure call or functions).

hth,

/m