[
https://issues.jboss.org/browse/TEIID-2644?page=com.atlassian.jira.plugin...
]
Steven Hawkins resolved TEIID-2644.
-----------------------------------
Resolution: Done
Addressed by adding logic that will look at the return/out parameters for a native type of
"REF CURSOR", if found we'll bind as a cursor and use the first one as the
result set (we may want to revisit that for procedures that return multiple cursors).
For example:
Oracle stored procedure:
{code} procedure proc(Param1 IN int, Param2 OUT TestTypes.ref_cursor)
AS bqt_cursor TestTypes.ref_cursor;
begin
OPEN bqt_cursor FOR select IntKey, StringKey from SmallA where IntKey < Param1;
Param2 := bqt_cursor;
end; {code}
Teiid DDL Representation:
{code} create foreign procedure proc (in x integer, out y object options (native_type
'REF CURSOR'))
returns table (a integer, b string) {code}
Note that native_type ddl handling for procedure parameters was added for this issue.
Teiid Designer does not currently provide that metadata, but you can use ALTER statements
to add the REF CURSOR native type via the vdb.xml.
This could be called with the Teiid SQL (which can omit the out parameters):
{code} call proc(1) {code}
Just as we do now if there is no return parameter and no out parameter marked as a REF
CURSOR, we'll still assume that it's a stored function returning a cursor.
An out parameter table type may at worst now require a wrapping anon procedure block to
assign the value as a cursor to an out parameter.
Also added better handling for importing the unknown type and binding something typed as
object - we still need handling for out parameters of object/unknown type.
Support retrieving result sets from any out parameter
-----------------------------------------------------
Key: TEIID-2644
URL:
https://issues.jboss.org/browse/TEIID-2644
Project: Teiid
Issue Type: Enhancement
Components: JDBC Connector
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 8.6
Currently Teiid expects the driver (for example DataDirect) or in case of oracle the
return parameter to be result set. In scenarios were a wrapping stored function cannot be
created we should also offer support for retrieving any out parameter as the result set.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira