[
https://issues.jboss.org/browse/TEIIDDES-2942?page=com.atlassian.jira.plu...
]
Barry LaFond commented on TEIIDDES-2942:
----------------------------------------
[~shawkins] So Designer allows a) and b) above.
* A procedure can only have have 1 out parameter marked as a return
Designer has 4 direction options: OUT, INOUT, OUT and RETURN, so there's no way to
set an OUT parameter to be returned. There can only be 1 RETURN parameter, else validation
ERROR
So the exporter will treat OUT's as straight OUT parameters and if a RETURN parameter
exists, then it'll be treated as an OUT parameter with a "result" added.
Procedure input parameter has result in the generated DDL
---------------------------------------------------------
Key: TEIIDDES-2942
URL:
https://issues.jboss.org/browse/TEIIDDES-2942
Project: Teiid Designer
Issue Type: Bug
Components: Dynamic VDBs
Affects Versions: 10.0.2
Environment: Fedora 24
Reporter: Matej Kralik
Priority: Critical
Fix For: 10.0.2
Attachments: ddlProject.zip
I have a procedure with one input parameter. When I want to preview this procedure or
deploy dynamic VDB, server shows me error that:
{code:java}
TEIID31100 Parsing error: Encountered "(4000) [*]result[*]) RETURNS" at line 2,
column 52.
Procedure testProc RESULT param p1 must be of type OUT.
{code}
I noticed that generated dynamic VDB contains 'result' in this parameter but this
parameter has set direction to IN. When I delete the result from dynamic VDB, the
procedure works fine.
Actual DDL:
{code:java}
CREATE VIRTUAL PROCEDURE testProc (p1 string(4000) result) RETURNS TABLE (xml_out xml)
OPTIONS ("REST:METHOD" 'GET', "REST:URI" 'test/{p1}')
AS
BEGIN
SELECT XMLELEMENT(NAME test, XMLFOREST(ProcedureModel.testProc.p1 AS elem1,
'elem2' AS elem2)) AS xml_out;
END;
{code}
expected DDL:
{code:java}
CREATE VIRTUAL PROCEDURE testProc (p1 string(4000)) RETURNS TABLE (xml_out xml) OPTIONS
("REST:METHOD" 'GET', "REST:URI" 'test/{p1}')
AS
BEGIN
SELECT XMLELEMENT(NAME test, XMLFOREST(ProcedureModel.testProc.p1 AS elem1,
'elem2' AS elem2)) AS xml_out;
END;
{code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)