diff --git a/forward_engineering/ddlProvider/ddlHelpers/functionHelper.js b/forward_engineering/ddlProvider/ddlHelpers/functionHelper.js index bdb9580..3fe3ec3 100644 --- a/forward_engineering/ddlProvider/ddlHelpers/functionHelper.js +++ b/forward_engineering/ddlProvider/ddlHelpers/functionHelper.js @@ -67,7 +67,7 @@ module.exports = ({ _, templates, assignTemplates, getFunctionArguments, getName } }; const getExecutionRows = (value, udf) => { - if (!value || !udf.functionReturnsSetOf) { + if (!value || (!udf.functionReturnsSetOf && !isFunctionReturnsTable(udf))) { return ''; } @@ -84,6 +84,11 @@ module.exports = ({ _, templates, assignTemplates, getFunctionArguments, getName } }; + const isFunctionReturnsTable = (udf) => { + const returnType = (udf.functionReturnType || '').trim().toUpperCase(); + return returnType.startsWith('TABLE'); + }; + return { getFunctionsScript, }; diff --git a/properties_pane/container_level/containerLevelConfig.json b/properties_pane/container_level/containerLevelConfig.json index f8f8604..a512189 100644 --- a/properties_pane/container_level/containerLevelConfig.json +++ b/properties_pane/container_level/containerLevelConfig.json @@ -312,11 +312,7 @@ making sure that you maintain a proper JSON format. "valueType": "number", "minValue": 0, "step": 1, - "propertyTooltip": "A positive number giving the estimated number of rows that the planner should expect the function to return.", - "dependency": { - "key": "functionReturnsSetOf", - "value": true - } + "propertyTooltip": "A positive number giving the estimated number of rows that the planner should expect the function to return." }, { "propertyName": "Support function",