]
Matej Kralik reopened TEIIDDES-2783:
------------------------------------
This is not fixed in TD 10.0.1.Final
When I tied this DDL:
{code:java}
CREATE VIRTUAL PROCEDURE selfProc (stringIN string(4000) OPTIONS(ANNOTATION 'parameter
description')) RETURNS OPTIONS(ANNOTATION 'resultset description') TABLE
(result string(30))
OPTIONS(ANNOTATION 'procedure description')
AS
BEGIN
SELECT viewModel.selfProc.stringIN AS result;
END;
{code}
ResultSet description is not set correctly. In the result set description is all DDL
(Screenshot1)
Next issue is when I want to export teiid DDL from view model whose resultset columns
contains a description. The description is generated twice. (project is in the
attachments)
The DDL looks like :
{code:java}
CREATE VIRTUAL PROCEDURE selfProc (stringIN string(4000)) RETURNS TABLE (result string(30)
OPTIONS(ANNOTATION 'RS column description') OPTIONS(ANNOTATION 'RS column
description'))
AS
BEGIN
SELECT viewModel.selfProc.stringIN AS result;
END;
{code}
Expected ddl:
{code:java}
CREATE VIRTUAL PROCEDURE selfProc (stringIN string(4000)) RETURNS TABLE (result string(30)
OPTIONS(ANNOTATION 'RS column description'))
AS
BEGIN
SELECT viewModel.selfProc.stringIN AS result;
END;
{code}
Need to add support for parsing OPTIONS in procedure statements
---------------------------------------------------------------
Key: TEIIDDES-2783
URL:
https://issues.jboss.org/browse/TEIIDDES-2783
Project: Teiid Designer
Issue Type: Bug
Components: Import/Export, ModeShape Integration, Patch Release
Reporter: Barry LaFond
Assignee: Dan Florian
Labels: release_notes, verified_jbdsis-9.0.0.Beta
Fix For: 10.0
The procedure DDL syntax supports OPTIONS() clause for procedure, parameter, result set,
result set columns and datatype (RETURNS) clause.
CreateProcedureParser.parseReturnsClause() is not processing any OPTIONS() for procedure
when RETURNS is just a datatype. See:
https://docs.jboss.org/author/display/TEIID/BNF+for+SQL+Grammar#BNFforSQL...
Should be able to parse the following and set the EMF *Description* (Annotation) value
when imported into Designer
{code}
CREATE FOREIGN PROCEDURE ProcedureWithRS (
newParameter_1 string(4000) OPTIONS(ANNOTATION 'parameter 1 description'),
newParameter_2 string(4000)
) RETURNS string(255) OPTIONS(ANNOTATION 'Example')
{code}