]
Barry LaFond edited comment on TEIIDDES-2942 at 10/20/16 2:44 PM:
------------------------------------------------------------------
[~shawkins] So in Designer
1) we have both OUT and RETURN directions and they should behave just as an OUT direction
2) can there be multiple OUT/RETURN parameters or just one?
3) an OUT direction adds the *result* to the parameter
4) A Procedure can have both an OUT parameter AND a Result Set
was (Author: blafond):
[~shawkins] So in Designer
1) we have both OUT and RETURN directions and they should behave just as an OUT direction
2) an OUT direction adds the *result* to the parameter
3) A Procedure can have both an OUT parameter AND a Result Set
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}