From 40979cba4ab416594062184ac0d1ff57b9090f2e Mon Sep 17 00:00:00 2001 From: Pascal Desmarets Date: Fri, 17 Oct 2025 19:20:27 +0200 Subject: [PATCH 1/7] Annotations for tables, views and columns --- .../entity_level/entityLevelConfig.json | 86 +++ .../field_level/fieldLevelConfig.json | 516 ++++++++++++++++++ .../view_level/viewLevelConfig.json | 43 ++ 3 files changed, 645 insertions(+) diff --git a/properties_pane/entity_level/entityLevelConfig.json b/properties_pane/entity_level/entityLevelConfig.json index aa17914b..c50e1a6f 100644 --- a/properties_pane/entity_level/entityLevelConfig.json +++ b/properties_pane/entity_level/entityLevelConfig.json @@ -846,6 +846,49 @@ making sure that you maintain a proper JSON format. "template": "textarea", "markdown": false }, + { + "propertyName": "Annotations", + "propertyKeyword": "tableAnnotations", + "propertyTooltip": "An individual annotation has a name and an optional value. Both the name and the value are freeform text fields. Annotations are additive, meaning that multiple annotations can be specified for the same schema object in a single DDL.", + "propertyType": "group", + "structure": [ + { + "propertyName": "Name", + "propertyKeyword": "tableAnnotationName", + "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", + "propertyType": "text", + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,1024}[^\\.,\\-=/:\\s]$" + } + }, + { + "propertyName": "Value", + "propertyKeyword": "tableAnnotationValue", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyType": "details", + "template": "textarea", + "markdown": false, + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,4000}[^\\.,\\-=/:\\s]$" + } + } + ], + "dependency": { + "type": "not", + "values": [ + { + "level": "model", + "key": "dbVersion", + "value": "12c" + }, + { + "level": "model", + "key": "dbVersion", + "value": "18c" + } + ] + } + }, { "propertyName": "Remarks", "propertyKeyword": "comments", @@ -1125,6 +1168,49 @@ making sure that you maintain a proper JSON format. "defaultValue": "logging", "options": ["", "logging", "nologging", "filesystem_like_logging"] }, + { + "propertyName": "Annotations", + "propertyKeyword": "indexAnnotations", + "propertyTooltip": "An individual annotation has a name and an optional value. Both the name and the value are freeform text fields. Annotations are additive, meaning that multiple annotations can be specified for the same schema object in a single DDL.", + "propertyType": "group", + "structure": [ + { + "propertyName": "Name", + "propertyKeyword": "indexAnnotationName", + "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", + "propertyType": "text", + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,1024}[^\\.,\\-=/:\\s]$" + } + }, + { + "propertyName": "Value", + "propertyKeyword": "indexAnnotationValue", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyType": "details", + "template": "textarea", + "markdown": false, + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,4000}[^\\.,\\-=/:\\s]$" + } + } + ], + "dependency": { + "type": "not", + "values": [ + { + "level": "model", + "key": "dbVersion", + "value": "12c" + }, + { + "level": "model", + "key": "dbVersion", + "value": "18c" + } + ] + } + }, { "propertyName": "Comments", "propertyKeyword": "indxComments", diff --git a/properties_pane/field_level/fieldLevelConfig.json b/properties_pane/field_level/fieldLevelConfig.json index 63117830..689341b4 100644 --- a/properties_pane/field_level/fieldLevelConfig.json +++ b/properties_pane/field_level/fieldLevelConfig.json @@ -2117,6 +2117,49 @@ making sure that you maintain a proper JSON format. ] } }, + { + "propertyName": "Annotations", + "propertyKeyword": "columnAnnotations", + "propertyTooltip": "An individual annotation has a name and an optional value. Both the name and the value are freeform text fields. Annotations are additive, meaning that multiple annotations can be specified for the same schema object in a single DDL.", + "propertyType": "group", + "structure": [ + { + "propertyName": "Name", + "propertyKeyword": "columnAnnotationName", + "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", + "propertyType": "text", + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,1024}[^\\.,\\-=/:\\s]$" + } + }, + { + "propertyName": "Value", + "propertyKeyword": "columnAnnotationValue", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyType": "details", + "template": "textarea", + "markdown": false, + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,4000}[^\\.,\\-=/:\\s]$" + } + } + ], + "dependency": { + "type": "not", + "values": [ + { + "level": "model", + "key": "dbVersion", + "value": "12c" + }, + { + "level": "model", + "key": "dbVersion", + "value": "18c" + } + ] + } + }, { "propertyName": "Remarks", "propertyKeyword": "comments", @@ -4071,6 +4114,49 @@ making sure that you maintain a proper JSON format. ] } }, + { + "propertyName": "Annotations", + "propertyKeyword": "columnAnnotations", + "propertyTooltip": "An individual annotation has a name and an optional value. Both the name and the value are freeform text fields. Annotations are additive, meaning that multiple annotations can be specified for the same schema object in a single DDL.", + "propertyType": "group", + "structure": [ + { + "propertyName": "Name", + "propertyKeyword": "columnAnnotationName", + "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", + "propertyType": "text", + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,1024}[^\\.,\\-=/:\\s]$" + } + }, + { + "propertyName": "Value", + "propertyKeyword": "columnAnnotationValue", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyType": "details", + "template": "textarea", + "markdown": false, + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,4000}[^\\.,\\-=/:\\s]$" + } + } + ], + "dependency": { + "type": "not", + "values": [ + { + "level": "model", + "key": "dbVersion", + "value": "12c" + }, + { + "level": "model", + "key": "dbVersion", + "value": "18c" + } + ] + } + }, { "propertyName": "Remarks", "propertyKeyword": "comments", @@ -5777,6 +5863,49 @@ making sure that you maintain a proper JSON format. ] } }, + { + "propertyName": "Annotations", + "propertyKeyword": "columnAnnotations", + "propertyTooltip": "An individual annotation has a name and an optional value. Both the name and the value are freeform text fields. Annotations are additive, meaning that multiple annotations can be specified for the same schema object in a single DDL.", + "propertyType": "group", + "structure": [ + { + "propertyName": "Name", + "propertyKeyword": "columnAnnotationName", + "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", + "propertyType": "text", + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,1024}[^\\.,\\-=/:\\s]$" + } + }, + { + "propertyName": "Value", + "propertyKeyword": "columnAnnotationValue", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyType": "details", + "template": "textarea", + "markdown": false, + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,4000}[^\\.,\\-=/:\\s]$" + } + } + ], + "dependency": { + "type": "not", + "values": [ + { + "level": "model", + "key": "dbVersion", + "value": "12c" + }, + { + "level": "model", + "key": "dbVersion", + "value": "18c" + } + ] + } + }, { "propertyName": "Remarks", "propertyKeyword": "comments", @@ -6527,6 +6656,49 @@ making sure that you maintain a proper JSON format. ] } }, + { + "propertyName": "Annotations", + "propertyKeyword": "columnAnnotations", + "propertyTooltip": "An individual annotation has a name and an optional value. Both the name and the value are freeform text fields. Annotations are additive, meaning that multiple annotations can be specified for the same schema object in a single DDL.", + "propertyType": "group", + "structure": [ + { + "propertyName": "Name", + "propertyKeyword": "columnAnnotationName", + "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", + "propertyType": "text", + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,1024}[^\\.,\\-=/:\\s]$" + } + }, + { + "propertyName": "Value", + "propertyKeyword": "columnAnnotationValue", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyType": "details", + "template": "textarea", + "markdown": false, + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,4000}[^\\.,\\-=/:\\s]$" + } + } + ], + "dependency": { + "type": "not", + "values": [ + { + "level": "model", + "key": "dbVersion", + "value": "12c" + }, + { + "level": "model", + "key": "dbVersion", + "value": "18c" + } + ] + } + }, { "propertyName": "Remarks", "propertyKeyword": "comments", @@ -7678,6 +7850,49 @@ making sure that you maintain a proper JSON format. ] } }, + { + "propertyName": "Annotations", + "propertyKeyword": "columnAnnotations", + "propertyTooltip": "An individual annotation has a name and an optional value. Both the name and the value are freeform text fields. Annotations are additive, meaning that multiple annotations can be specified for the same schema object in a single DDL.", + "propertyType": "group", + "structure": [ + { + "propertyName": "Name", + "propertyKeyword": "columnAnnotationName", + "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", + "propertyType": "text", + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,1024}[^\\.,\\-=/:\\s]$" + } + }, + { + "propertyName": "Value", + "propertyKeyword": "columnAnnotationValue", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyType": "details", + "template": "textarea", + "markdown": false, + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,4000}[^\\.,\\-=/:\\s]$" + } + } + ], + "dependency": { + "type": "not", + "values": [ + { + "level": "model", + "key": "dbVersion", + "value": "12c" + }, + { + "level": "model", + "key": "dbVersion", + "value": "18c" + } + ] + } + }, { "propertyName": "Remarks", "propertyKeyword": "comments", @@ -9026,6 +9241,49 @@ making sure that you maintain a proper JSON format. ] } }, + { + "propertyName": "Annotations", + "propertyKeyword": "columnAnnotations", + "propertyTooltip": "An individual annotation has a name and an optional value. Both the name and the value are freeform text fields. Annotations are additive, meaning that multiple annotations can be specified for the same schema object in a single DDL.", + "propertyType": "group", + "structure": [ + { + "propertyName": "Name", + "propertyKeyword": "columnAnnotationName", + "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", + "propertyType": "text", + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,1024}[^\\.,\\-=/:\\s]$" + } + }, + { + "propertyName": "Value", + "propertyKeyword": "columnAnnotationValue", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyType": "details", + "template": "textarea", + "markdown": false, + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,4000}[^\\.,\\-=/:\\s]$" + } + } + ], + "dependency": { + "type": "not", + "values": [ + { + "level": "model", + "key": "dbVersion", + "value": "12c" + }, + { + "level": "model", + "key": "dbVersion", + "value": "18c" + } + ] + } + }, { "propertyName": "Remarks", "propertyKeyword": "comments", @@ -10617,6 +10875,49 @@ making sure that you maintain a proper JSON format. ] } }, + { + "propertyName": "Annotations", + "propertyKeyword": "columnAnnotations", + "propertyTooltip": "An individual annotation has a name and an optional value. Both the name and the value are freeform text fields. Annotations are additive, meaning that multiple annotations can be specified for the same schema object in a single DDL.", + "propertyType": "group", + "structure": [ + { + "propertyName": "Name", + "propertyKeyword": "columnAnnotationName", + "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", + "propertyType": "text", + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,1024}[^\\.,\\-=/:\\s]$" + } + }, + { + "propertyName": "Value", + "propertyKeyword": "columnAnnotationValue", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyType": "details", + "template": "textarea", + "markdown": false, + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,4000}[^\\.,\\-=/:\\s]$" + } + } + ], + "dependency": { + "type": "not", + "values": [ + { + "level": "model", + "key": "dbVersion", + "value": "12c" + }, + { + "level": "model", + "key": "dbVersion", + "value": "18c" + } + ] + } + }, { "propertyName": "Remarks", "propertyKeyword": "comments", @@ -10716,6 +11017,49 @@ making sure that you maintain a proper JSON format. "propertyType": "details", "template": "textarea" }, + { + "propertyName": "Annotations", + "propertyKeyword": "columnAnnotations", + "propertyTooltip": "An individual annotation has a name and an optional value. Both the name and the value are freeform text fields. Annotations are additive, meaning that multiple annotations can be specified for the same schema object in a single DDL.", + "propertyType": "group", + "structure": [ + { + "propertyName": "Name", + "propertyKeyword": "columnAnnotationName", + "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", + "propertyType": "text", + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,1024}[^\\.,\\-=/:\\s]$" + } + }, + { + "propertyName": "Value", + "propertyKeyword": "columnAnnotationValue", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyType": "details", + "template": "textarea", + "markdown": false, + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,4000}[^\\.,\\-=/:\\s]$" + } + } + ], + "dependency": { + "type": "not", + "values": [ + { + "level": "model", + "key": "dbVersion", + "value": "12c" + }, + { + "level": "model", + "key": "dbVersion", + "value": "18c" + } + ] + } + }, { "propertyName": "Remarks", "propertyKeyword": "comments", @@ -11511,6 +11855,49 @@ making sure that you maintain a proper JSON format. } }, "sample", + { + "propertyName": "Annotations", + "propertyKeyword": "columnAnnotations", + "propertyTooltip": "An individual annotation has a name and an optional value. Both the name and the value are freeform text fields. Annotations are additive, meaning that multiple annotations can be specified for the same schema object in a single DDL.", + "propertyType": "group", + "structure": [ + { + "propertyName": "Name", + "propertyKeyword": "columnAnnotationName", + "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", + "propertyType": "text", + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,1024}[^\\.,\\-=/:\\s]$" + } + }, + { + "propertyName": "Value", + "propertyKeyword": "columnAnnotationValue", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyType": "details", + "template": "textarea", + "markdown": false, + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,4000}[^\\.,\\-=/:\\s]$" + } + } + ], + "dependency": { + "type": "not", + "values": [ + { + "level": "model", + "key": "dbVersion", + "value": "12c" + }, + { + "level": "model", + "key": "dbVersion", + "value": "18c" + } + ] + } + }, { "propertyName": "Remarks", "propertyKeyword": "comments", @@ -12009,6 +12396,49 @@ making sure that you maintain a proper JSON format. ] } }, + { + "propertyName": "Annotations", + "propertyKeyword": "columnAnnotations", + "propertyTooltip": "An individual annotation has a name and an optional value. Both the name and the value are freeform text fields. Annotations are additive, meaning that multiple annotations can be specified for the same schema object in a single DDL.", + "propertyType": "group", + "structure": [ + { + "propertyName": "Name", + "propertyKeyword": "columnAnnotationName", + "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", + "propertyType": "text", + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,1024}[^\\.,\\-=/:\\s]$" + } + }, + { + "propertyName": "Value", + "propertyKeyword": "columnAnnotationValue", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyType": "details", + "template": "textarea", + "markdown": false, + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,4000}[^\\.,\\-=/:\\s]$" + } + } + ], + "dependency": { + "type": "not", + "values": [ + { + "level": "model", + "key": "dbVersion", + "value": "12c" + }, + { + "level": "model", + "key": "dbVersion", + "value": "18c" + } + ] + } + }, { "propertyName": "Remarks", "propertyKeyword": "comments", @@ -12716,6 +13146,49 @@ making sure that you maintain a proper JSON format. ] } }, + { + "propertyName": "Annotations", + "propertyKeyword": "columnAnnotations", + "propertyTooltip": "An individual annotation has a name and an optional value. Both the name and the value are freeform text fields. Annotations are additive, meaning that multiple annotations can be specified for the same schema object in a single DDL.", + "propertyType": "group", + "structure": [ + { + "propertyName": "Name", + "propertyKeyword": "columnAnnotationName", + "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", + "propertyType": "text", + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,1024}[^\\.,\\-=/:\\s]$" + } + }, + { + "propertyName": "Value", + "propertyKeyword": "columnAnnotationValue", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyType": "details", + "template": "textarea", + "markdown": false, + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,4000}[^\\.,\\-=/:\\s]$" + } + } + ], + "dependency": { + "type": "not", + "values": [ + { + "level": "model", + "key": "dbVersion", + "value": "12c" + }, + { + "level": "model", + "key": "dbVersion", + "value": "18c" + } + ] + } + }, { "propertyName": "Remarks", "propertyKeyword": "comments", @@ -13227,6 +13700,49 @@ making sure that you maintain a proper JSON format. } ] }, + { + "propertyName": "Annotations", + "propertyKeyword": "columnAnnotations", + "propertyTooltip": "An individual annotation has a name and an optional value. Both the name and the value are freeform text fields. Annotations are additive, meaning that multiple annotations can be specified for the same schema object in a single DDL.", + "propertyType": "group", + "structure": [ + { + "propertyName": "Name", + "propertyKeyword": "columnAnnotationName", + "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", + "propertyType": "text", + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,1024}[^\\.,\\-=/:\\s]$" + } + }, + { + "propertyName": "Value", + "propertyKeyword": "columnAnnotationValue", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyType": "details", + "template": "textarea", + "markdown": false, + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,4000}[^\\.,\\-=/:\\s]$" + } + } + ], + "dependency": { + "type": "not", + "values": [ + { + "level": "model", + "key": "dbVersion", + "value": "12c" + }, + { + "level": "model", + "key": "dbVersion", + "value": "18c" + } + ] + } + }, { "propertyName": "Remarks", "propertyKeyword": "comments", diff --git a/properties_pane/view_level/viewLevelConfig.json b/properties_pane/view_level/viewLevelConfig.json index 69710707..87ff8dd8 100644 --- a/properties_pane/view_level/viewLevelConfig.json +++ b/properties_pane/view_level/viewLevelConfig.json @@ -629,6 +629,49 @@ } ] }, + { + "propertyName": "Annotations", + "propertyKeyword": "viewAnnotations", + "propertyTooltip": "An individual annotation has a name and an optional value. Both the name and the value are freeform text fields. Annotations are additive, meaning that multiple annotations can be specified for the same schema object in a single DDL.", + "propertyType": "group", + "structure": [ + { + "propertyName": "Name", + "propertyKeyword": "viewAnnotationName", + "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", + "propertyType": "text", + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,1024}[^\\.,\\-=/:\\s]$" + } + }, + { + "propertyName": "Value", + "propertyKeyword": "viewAnnotationValue", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyType": "details", + "template": "textarea", + "markdown": false, + "validation": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,4000}[^\\.,\\-=/:\\s]$" + } + } + ], + "dependency": { + "type": "not", + "values": [ + { + "level": "model", + "key": "dbVersion", + "value": "12c" + }, + { + "level": "model", + "key": "dbVersion", + "value": "18c" + } + ] + } + }, { "propertyName": "Remarks", "propertyKeyword": "comments", From ad6b4ca71e8cb4da4a634b789d8b4c59e105442d Mon Sep 17 00:00:00 2001 From: Ivan Date: Thu, 26 Feb 2026 11:49:18 +0100 Subject: [PATCH 2/7] Hck 14981: FE annotations table level (#232) * HCK-14981: add annotations to Table level * HCK-14981: update annotation name creation logic * HCK-14981: update annotation value creation logic --------- Co-authored-by: Linsted --- .../ddlProvider/ddlHelpers/tableHelper.js | 44 ++++++++++++++++++- .../ddlProvider/ddlProvider.js | 4 ++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/forward_engineering/ddlProvider/ddlHelpers/tableHelper.js b/forward_engineering/ddlProvider/ddlHelpers/tableHelper.js index 8b153ea6..aa1beba3 100644 --- a/forward_engineering/ddlProvider/ddlHelpers/tableHelper.js +++ b/forward_engineering/ddlProvider/ddlHelpers/tableHelper.js @@ -1,6 +1,13 @@ const _ = require('lodash'); -module.exports = ({ getColumnsList, checkAllKeysDeactivated, commentIfDeactivated, prepareName, assignTemplates }) => { +module.exports = ({ + getColumnsList, + checkAllKeysDeactivated, + commentIfDeactivated, + prepareName, + assignTemplates, + wrapComment, +}) => { const getTableType = ({ duplicated, external, @@ -36,6 +43,7 @@ module.exports = ({ getColumnsList, checkAllKeysDeactivated, commentIfDeactivate { key: 'partitioning', getValue: getPartitioning }, { key: 'selectStatement', getValue: getBasicValue('AS') }, { key: 'tableProperties', getValue: value => _.trim(value) }, + { key: 'tableAnnotations', getValue: getAnnotationsString }, ] .map(config => (tableData[config.key] ? wrap(config.getValue(tableData[config.key], tableData)) : '')) .filter(Boolean) @@ -295,6 +303,40 @@ module.exports = ({ getColumnsList, checkAllKeysDeactivated, commentIfDeactivate return { foreignOnDelete }; }; + /** + * Generates annotations string. + * @param {Array} tableAnnotations - tableAnnotations array. + * @returns {string} - Annotation string (e.g: "\nANNOTATIONS (...)") or ''. + */ + const getAnnotationsString = tableAnnotations => { + if (!Array.isArray(tableAnnotations) || tableAnnotations.length === 0) { + return ''; + } + + const wrapValue = value => wrapComment(value); + + const annotationsItems = tableAnnotations + .filter(annotation => annotation?.tableAnnotationName?.trim()) + .map(annotation => { + const name = prepareName(annotation.tableAnnotationName.trim()); + + let finalValue = ''; + const annotationValue = annotation?.tableAnnotationValue; + + if (annotationValue !== undefined && String(annotationValue).trim() !== '') { + finalValue = ' ' + wrapValue(String(annotationValue).trim()); + } + + return `${name}${finalValue}`; + }); + + if (annotationsItems.length > 0) { + return `ANNOTATIONS (${annotationsItems.join(', ')})`; + } + + return ''; + }; + return { getTableOptions, getTableType, diff --git a/forward_engineering/ddlProvider/ddlProvider.js b/forward_engineering/ddlProvider/ddlProvider.js index 40422eb5..54bf6b85 100644 --- a/forward_engineering/ddlProvider/ddlProvider.js +++ b/forward_engineering/ddlProvider/ddlProvider.js @@ -65,6 +65,7 @@ module.exports = (baseProvider, options, app) => { commentIfDeactivated, prepareName, assignTemplates, + wrapComment, }); const { getUserDefinedType, isNotPlainType } = require('./ddlHelpers/udtHelper')({ @@ -375,6 +376,7 @@ module.exports = (baseProvider, options, app) => { 'description', 'ifNotExist', 'tableProperties', + 'tableAnnotations', ), synonyms: tableData?.schemaData?.synonyms?.filter(synonym => synonym.synonymEntityId === jsonSchema.GUID) || @@ -407,6 +409,7 @@ module.exports = (baseProvider, options, app) => { tableProperties, synonyms, notNullConstraints, + tableAnnotations, }, isActivated, ) { @@ -471,6 +474,7 @@ module.exports = (baseProvider, options, app) => { partitioning, selectStatement, tableProperties, + tableAnnotations, }), }); if (usingTryCatchWrapper) { From fae3092a90eaf9e3a45f855ccbb3bd36da46f699 Mon Sep 17 00:00:00 2001 From: chulanovskyi-bs <56116665+chulanovskyi-bs@users.noreply.github.com> Date: Thu, 26 Feb 2026 13:40:39 +0200 Subject: [PATCH 3/7] chore: unified annotation keywords (#233) * chore: unified annotation keywords * chore: moved to a shared place --- .../ddlProvider/ddlHelpers/tableHelper.js | 56 ++----------------- .../utils/getAnnotationsString.js | 44 +++++++++++++++ .../entity_level/entityLevelConfig.json | 8 +-- .../field_level/fieldLevelConfig.json | 48 ++++++++-------- .../view_level/viewLevelConfig.json | 4 +- 5 files changed, 78 insertions(+), 82 deletions(-) create mode 100644 forward_engineering/utils/getAnnotationsString.js diff --git a/forward_engineering/ddlProvider/ddlHelpers/tableHelper.js b/forward_engineering/ddlProvider/ddlHelpers/tableHelper.js index aa1beba3..4a922491 100644 --- a/forward_engineering/ddlProvider/ddlHelpers/tableHelper.js +++ b/forward_engineering/ddlProvider/ddlHelpers/tableHelper.js @@ -1,22 +1,8 @@ const _ = require('lodash'); +const { getAnnotationsString } = require('../../utils/getAnnotationsString'); -module.exports = ({ - getColumnsList, - checkAllKeysDeactivated, - commentIfDeactivated, - prepareName, - assignTemplates, - wrapComment, -}) => { - const getTableType = ({ - duplicated, - external, - immutable, - sharded, - temporary, - temporaryType, - blockchain_table_clauses, - }) => { +module.exports = ({ getColumnsList, checkAllKeysDeactivated, commentIfDeactivated, prepareName }) => { + const getTableType = ({ duplicated, immutable, sharded, temporary, temporaryType, blockchain_table_clauses }) => { const blockchain = !_.isEmpty(blockchain_table_clauses); switch (true) { case temporary: @@ -43,7 +29,7 @@ module.exports = ({ { key: 'partitioning', getValue: getPartitioning }, { key: 'selectStatement', getValue: getBasicValue('AS') }, { key: 'tableProperties', getValue: value => _.trim(value) }, - { key: 'tableAnnotations', getValue: getAnnotationsString }, + { key: 'tableAnnotations', getValue: getAnnotationsString(prepareName) }, ] .map(config => (tableData[config.key] ? wrap(config.getValue(tableData[config.key], tableData)) : '')) .filter(Boolean) @@ -303,40 +289,6 @@ module.exports = ({ return { foreignOnDelete }; }; - /** - * Generates annotations string. - * @param {Array} tableAnnotations - tableAnnotations array. - * @returns {string} - Annotation string (e.g: "\nANNOTATIONS (...)") or ''. - */ - const getAnnotationsString = tableAnnotations => { - if (!Array.isArray(tableAnnotations) || tableAnnotations.length === 0) { - return ''; - } - - const wrapValue = value => wrapComment(value); - - const annotationsItems = tableAnnotations - .filter(annotation => annotation?.tableAnnotationName?.trim()) - .map(annotation => { - const name = prepareName(annotation.tableAnnotationName.trim()); - - let finalValue = ''; - const annotationValue = annotation?.tableAnnotationValue; - - if (annotationValue !== undefined && String(annotationValue).trim() !== '') { - finalValue = ' ' + wrapValue(String(annotationValue).trim()); - } - - return `${name}${finalValue}`; - }); - - if (annotationsItems.length > 0) { - return `ANNOTATIONS (${annotationsItems.join(', ')})`; - } - - return ''; - }; - return { getTableOptions, getTableType, diff --git a/forward_engineering/utils/getAnnotationsString.js b/forward_engineering/utils/getAnnotationsString.js new file mode 100644 index 00000000..331796dd --- /dev/null +++ b/forward_engineering/utils/getAnnotationsString.js @@ -0,0 +1,44 @@ +const { wrapComment } = require('./general'); + +/** + * @typedef {{ + * annotationName?: string + * annotationValue?: string + * }} Annotation + */ + +/** + * Generates annotations string. + * @param {function} prepareName + * @returns {(annotations: Annotation[]) => string} - returns Annotations string (e.g: "\nANNOTATIONS (...)") or ''. + */ +const getAnnotationsString = prepareName => annotations => { + if (!Array.isArray(annotations) || annotations.length === 0) { + return ''; + } + + const wrapValue = value => wrapComment(value); + + const annotationsItems = annotations + .filter(annotation => annotation?.annotationName?.trim()) + .map(annotation => { + const { annotationName, annotationValue } = annotation; + const name = prepareName(annotationName.trim()); + + let finalValue = ''; + + if (annotationValue !== undefined && annotationValue.trim() !== '') { + finalValue = ' ' + wrapValue(annotationValue.trim()); + } + + return `${name}${finalValue}`; + }); + + if (annotationsItems.length > 0) { + return `ANNOTATIONS (${annotationsItems.join(', ')})`; + } + + return ''; +}; + +module.exports = { getAnnotationsString }; diff --git a/properties_pane/entity_level/entityLevelConfig.json b/properties_pane/entity_level/entityLevelConfig.json index 245b55ee..3e54d6ff 100644 --- a/properties_pane/entity_level/entityLevelConfig.json +++ b/properties_pane/entity_level/entityLevelConfig.json @@ -912,7 +912,7 @@ making sure that you maintain a proper JSON format. "structure": [ { "propertyName": "Name", - "propertyKeyword": "tableAnnotationName", + "propertyKeyword": "annotationName", "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", "propertyType": "text", "validation": { @@ -921,7 +921,7 @@ making sure that you maintain a proper JSON format. }, { "propertyName": "Value", - "propertyKeyword": "tableAnnotationValue", + "propertyKeyword": "annotationValue", "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", @@ -1234,7 +1234,7 @@ making sure that you maintain a proper JSON format. "structure": [ { "propertyName": "Name", - "propertyKeyword": "indexAnnotationName", + "propertyKeyword": "annotationName", "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", "propertyType": "text", "validation": { @@ -1243,7 +1243,7 @@ making sure that you maintain a proper JSON format. }, { "propertyName": "Value", - "propertyKeyword": "indexAnnotationValue", + "propertyKeyword": "annotationValue", "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", diff --git a/properties_pane/field_level/fieldLevelConfig.json b/properties_pane/field_level/fieldLevelConfig.json index 727f3152..377146b2 100644 --- a/properties_pane/field_level/fieldLevelConfig.json +++ b/properties_pane/field_level/fieldLevelConfig.json @@ -2128,7 +2128,7 @@ making sure that you maintain a proper JSON format. "structure": [ { "propertyName": "Name", - "propertyKeyword": "columnAnnotationName", + "propertyKeyword": "annotationName", "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", "propertyType": "text", "validation": { @@ -2137,7 +2137,7 @@ making sure that you maintain a proper JSON format. }, { "propertyName": "Value", - "propertyKeyword": "columnAnnotationValue", + "propertyKeyword": "annotationValue", "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", @@ -4162,7 +4162,7 @@ making sure that you maintain a proper JSON format. "structure": [ { "propertyName": "Name", - "propertyKeyword": "columnAnnotationName", + "propertyKeyword": "annotationName", "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", "propertyType": "text", "validation": { @@ -4171,7 +4171,7 @@ making sure that you maintain a proper JSON format. }, { "propertyName": "Value", - "propertyKeyword": "columnAnnotationValue", + "propertyKeyword": "annotationValue", "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", @@ -5948,7 +5948,7 @@ making sure that you maintain a proper JSON format. "structure": [ { "propertyName": "Name", - "propertyKeyword": "columnAnnotationName", + "propertyKeyword": "annotationName", "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", "propertyType": "text", "validation": { @@ -5957,7 +5957,7 @@ making sure that you maintain a proper JSON format. }, { "propertyName": "Value", - "propertyKeyword": "columnAnnotationValue", + "propertyKeyword": "annotationValue", "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", @@ -6777,7 +6777,7 @@ making sure that you maintain a proper JSON format. "structure": [ { "propertyName": "Name", - "propertyKeyword": "columnAnnotationName", + "propertyKeyword": "annotationName", "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", "propertyType": "text", "validation": { @@ -6786,7 +6786,7 @@ making sure that you maintain a proper JSON format. }, { "propertyName": "Value", - "propertyKeyword": "columnAnnotationValue", + "propertyKeyword": "annotationValue", "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", @@ -8007,7 +8007,7 @@ making sure that you maintain a proper JSON format. "structure": [ { "propertyName": "Name", - "propertyKeyword": "columnAnnotationName", + "propertyKeyword": "annotationName", "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", "propertyType": "text", "validation": { @@ -8016,7 +8016,7 @@ making sure that you maintain a proper JSON format. }, { "propertyName": "Value", - "propertyKeyword": "columnAnnotationValue", + "propertyKeyword": "annotationValue", "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", @@ -9435,7 +9435,7 @@ making sure that you maintain a proper JSON format. "structure": [ { "propertyName": "Name", - "propertyKeyword": "columnAnnotationName", + "propertyKeyword": "annotationName", "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", "propertyType": "text", "validation": { @@ -9444,7 +9444,7 @@ making sure that you maintain a proper JSON format. }, { "propertyName": "Value", - "propertyKeyword": "columnAnnotationValue", + "propertyKeyword": "annotationValue", "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", @@ -11106,7 +11106,7 @@ making sure that you maintain a proper JSON format. "structure": [ { "propertyName": "Name", - "propertyKeyword": "columnAnnotationName", + "propertyKeyword": "annotationName", "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", "propertyType": "text", "validation": { @@ -11115,7 +11115,7 @@ making sure that you maintain a proper JSON format. }, { "propertyName": "Value", - "propertyKeyword": "columnAnnotationValue", + "propertyKeyword": "annotationValue", "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", @@ -11283,7 +11283,7 @@ making sure that you maintain a proper JSON format. "structure": [ { "propertyName": "Name", - "propertyKeyword": "columnAnnotationName", + "propertyKeyword": "annotationName", "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", "propertyType": "text", "validation": { @@ -11292,7 +11292,7 @@ making sure that you maintain a proper JSON format. }, { "propertyName": "Value", - "propertyKeyword": "columnAnnotationValue", + "propertyKeyword": "annotationValue", "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", @@ -12157,7 +12157,7 @@ making sure that you maintain a proper JSON format. "structure": [ { "propertyName": "Name", - "propertyKeyword": "columnAnnotationName", + "propertyKeyword": "annotationName", "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", "propertyType": "text", "validation": { @@ -12166,7 +12166,7 @@ making sure that you maintain a proper JSON format. }, { "propertyName": "Value", - "propertyKeyword": "columnAnnotationValue", + "propertyKeyword": "annotationValue", "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", @@ -12699,7 +12699,7 @@ making sure that you maintain a proper JSON format. "structure": [ { "propertyName": "Name", - "propertyKeyword": "columnAnnotationName", + "propertyKeyword": "annotationName", "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", "propertyType": "text", "validation": { @@ -12708,7 +12708,7 @@ making sure that you maintain a proper JSON format. }, { "propertyName": "Value", - "propertyKeyword": "columnAnnotationValue", + "propertyKeyword": "annotationValue", "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", @@ -13485,7 +13485,7 @@ making sure that you maintain a proper JSON format. "structure": [ { "propertyName": "Name", - "propertyKeyword": "columnAnnotationName", + "propertyKeyword": "annotationName", "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", "propertyType": "text", "validation": { @@ -13494,7 +13494,7 @@ making sure that you maintain a proper JSON format. }, { "propertyName": "Value", - "propertyKeyword": "columnAnnotationValue", + "propertyKeyword": "annotationValue", "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", @@ -14039,7 +14039,7 @@ making sure that you maintain a proper JSON format. "structure": [ { "propertyName": "Name", - "propertyKeyword": "columnAnnotationName", + "propertyKeyword": "annotationName", "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", "propertyType": "text", "validation": { @@ -14048,7 +14048,7 @@ making sure that you maintain a proper JSON format. }, { "propertyName": "Value", - "propertyKeyword": "columnAnnotationValue", + "propertyKeyword": "annotationValue", "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", diff --git a/properties_pane/view_level/viewLevelConfig.json b/properties_pane/view_level/viewLevelConfig.json index 674dc78b..b9347696 100644 --- a/properties_pane/view_level/viewLevelConfig.json +++ b/properties_pane/view_level/viewLevelConfig.json @@ -703,7 +703,7 @@ "structure": [ { "propertyName": "Name", - "propertyKeyword": "viewAnnotationName", + "propertyKeyword": "annotationName", "propertyTooltip": "An identifier that can have up to 1024 characters. If the annotation name is a reserved word it must be provided in double quotes. When a double quoted identifier is used, the identifier can also contain whitespace characters", "propertyType": "text", "validation": { @@ -712,7 +712,7 @@ }, { "propertyName": "Value", - "propertyKeyword": "viewAnnotationValue", + "propertyKeyword": "annotationValue", "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", From eb0334635f0df7789532724ca763452bff78bafb Mon Sep 17 00:00:00 2001 From: Ivan Date: Thu, 26 Feb 2026 14:20:47 +0100 Subject: [PATCH 4/7] HCK-14987: add column level annotations (#234) * HCK-14987: add column level annotations * HCK-14987: fix unnecessary space --- forward_engineering/ddlProvider/ddlProvider.js | 5 +++++ forward_engineering/ddlProvider/templates.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/forward_engineering/ddlProvider/ddlProvider.js b/forward_engineering/ddlProvider/ddlProvider.js index 54bf6b85..541e6f00 100644 --- a/forward_engineering/ddlProvider/ddlProvider.js +++ b/forward_engineering/ddlProvider/ddlProvider.js @@ -20,6 +20,7 @@ const { getColumnsList, prepareNameForScriptFormat, } = require('../utils/general'); +const { getAnnotationsString } = require('../utils/getAnnotationsString'); const { assignTemplates } = require('../utils/assignTemplates'); const { decorateType } = require('./ddlHelpers/columnDefinitionHelpers/decorateType'); const { getNotNullConstraints } = require('../alterScript/alterScriptHelpers/columnHelpers/nonNullConstraintHelper'); @@ -207,6 +208,7 @@ module.exports = (baseProvider, options, app) => { subtype: jsonSchema.subtype, defaultOnNull: jsonSchema.defaultOnNull, generatedDefaultValue: jsonSchema.generatedDefaultValue, + columnAnnotations: jsonSchema.columnAnnotations, }; }, @@ -221,6 +223,8 @@ module.exports = (baseProvider, options, app) => { convertColumnDefinition(columnDefinition, template = templates.columnDefinition) { const type = replaceTypeByVersion(columnDefinition.type, columnDefinition.dbVersion); + const annotations = getAnnotationsString(prepareName)(columnDefinition.columnAnnotations); + const finalAnnotationsClause = annotations ? ' ' + annotations : ''; return commentIfDeactivated( assignTemplates(template, { @@ -229,6 +233,7 @@ module.exports = (baseProvider, options, app) => { default: getColumnDefault(columnDefinition), encrypt: getColumnEncrypt(columnDefinition), constraints: getColumnConstraints(columnDefinition), + annotations: finalAnnotationsClause, }), { isActivated: columnDefinition.isActivated, diff --git a/forward_engineering/ddlProvider/templates.js b/forward_engineering/ddlProvider/templates.js index 82dce34a..50d5b0b9 100644 --- a/forward_engineering/ddlProvider/templates.js +++ b/forward_engineering/ddlProvider/templates.js @@ -8,7 +8,7 @@ module.exports = { createTableProps: '${columnDefinitions}${keyConstraints}${checkConstraints}${foreignKeyConstraints}${notNullConstraints}', - columnDefinition: '${name}${type}${default}${encrypt}${constraints}', + columnDefinition: '${name}${type}${default}${encrypt}${constraints}${annotations}', createKeyConstraint: '${constraintName}${keyType}${columns}${options}', From de1a7c40dcd90244e7980ccad42c5dc13486250d Mon Sep 17 00:00:00 2001 From: chulanovskyi-bs <56116665+chulanovskyi-bs@users.noreply.github.com> Date: Thu, 26 Feb 2026 15:29:40 +0200 Subject: [PATCH 5/7] HCK-14982: view annotations (#235) * feat: view annotations * chore: duplicated import --- forward_engineering/ddlProvider/ddlProvider.js | 4 ++++ forward_engineering/ddlProvider/templates.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/forward_engineering/ddlProvider/ddlProvider.js b/forward_engineering/ddlProvider/ddlProvider.js index 541e6f00..d4ae6e29 100644 --- a/forward_engineering/ddlProvider/ddlProvider.js +++ b/forward_engineering/ddlProvider/ddlProvider.js @@ -596,6 +596,7 @@ module.exports = (baseProvider, options, app) => { dbVersion: _.get(viewData, 'schemaData.dbVersion'), }, whereClause: detailsTab.whereClause, + viewAnnotations: detailsTab.viewAnnotations, }; }, @@ -659,6 +660,8 @@ module.exports = (baseProvider, options, app) => { const dbVersion = _.get(viewData, 'modelInfo.dbVersion', ''); const usingTryCatchWrapper = shouldUseTryCatchIfNotExistsWrapper(dbVersion); + const annotations = getAnnotationsString(prepareName)(viewData.viewAnnotations); + let createViewDdl = assignTemplates(templates.createView, { name: viewName, ifNotExists: !usingTryCatchWrapper && viewData.ifNotExist ? ' IF NOT EXISTS' : '', @@ -669,6 +672,7 @@ module.exports = (baseProvider, options, app) => { viewProperties: viewData.viewProperties ? ' \n' + tab(viewData.viewProperties) : '', sharing: viewData.sharing && !viewData.materialized ? ` SHARING=${viewData.sharing}` : '', selectStatement, + annotations: annotations ? `\n\t${annotations}` : '', }); if (usingTryCatchWrapper) { createViewDdl = wrapIfNotExists(createViewDdl, viewData.ifNotExist); diff --git a/forward_engineering/ddlProvider/templates.js b/forward_engineering/ddlProvider/templates.js index 50d5b0b9..c31cc41d 100644 --- a/forward_engineering/ddlProvider/templates.js +++ b/forward_engineering/ddlProvider/templates.js @@ -29,7 +29,7 @@ module.exports = { alterIndexRebuild: 'ALTER INDEX ${name} REBUILD ${options};', createView: - 'CREATE${orReplace}${force}${viewType}${materialized} VIEW${ifNotExists} ${name} ${sharing}${viewProperties}\n\tAS ${selectStatement}', + 'CREATE${orReplace}${force}${viewType}${materialized} VIEW${ifNotExists} ${name} ${sharing}${viewProperties}${annotations}\n\tAS ${selectStatement}', viewSelectStatement: 'SELECT ${keys}\n\tFROM ${tableName}', From eb596bfe04f7754c01ccd81846d409b89db459e6 Mon Sep 17 00:00:00 2001 From: chulanovskyi-bs <56116665+chulanovskyi-bs@users.noreply.github.com> Date: Thu, 26 Feb 2026 15:52:17 +0200 Subject: [PATCH 6/7] feat: duality view annotations (#236) --- .../dualityViewFeHelper/abstractDualityViewDdlCreator.js | 8 ++++++-- forward_engineering/ddlProvider/templates.js | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/forward_engineering/ddlProvider/ddlHelpers/dualityViewFeHelper/abstractDualityViewDdlCreator.js b/forward_engineering/ddlProvider/ddlHelpers/dualityViewFeHelper/abstractDualityViewDdlCreator.js index 17c78b2e..e3857936 100644 --- a/forward_engineering/ddlProvider/ddlHelpers/dualityViewFeHelper/abstractDualityViewDdlCreator.js +++ b/forward_engineering/ddlProvider/ddlHelpers/dualityViewFeHelper/abstractDualityViewDdlCreator.js @@ -1,5 +1,6 @@ const { getViewName } = require('../../../utils/general'); const { DualityViewPropertiesType } = require('../../../enums/DualityViewPropertiesType'); +const { getAnnotationsString } = require('../../../utils/getAnnotationsString'); /** * @abstract @@ -176,9 +177,10 @@ class AbstractDualityViewFeDdlCreator { /** * @param createViewDto {CreateDualityViewDto} + * @param prepareName {Function} * @return {string} * */ - getCreateJsonRelationalDualityViewHeadingDdl(createViewDto) { + getCreateJsonRelationalDualityViewHeadingDdl(createViewDto, prepareName) { const { jsonSchema, view } = createViewDto; const template = this._ddlTemplates?.dualityView?.createJsonRelationalDualityViewHeading || ''; @@ -187,12 +189,14 @@ class AbstractDualityViewFeDdlCreator { const editionableStatement = this._getEditionableStatement(jsonSchema); const viewName = getViewName(view); const ddlViewName = this._getNamePrefixedWithSchemaName(viewName, view.schemaName); + const annotations = getAnnotationsString(prepareName)(view.viewAnnotations); const params = { orReplaceStatement, forceStatement, editionableStatement, viewName: ddlViewName, + annotations: annotations ? `\n\t${annotations}` : '', }; return this._assignTemplates(template, params); } @@ -210,7 +214,7 @@ class AbstractDualityViewFeDdlCreator { * @return {string} * */ convertDualityViewToDdl(createViewDto) { - const heading = this.getCreateJsonRelationalDualityViewHeadingDdl(createViewDto); + const heading = this.getCreateJsonRelationalDualityViewHeadingDdl(createViewDto, this._prepareName); const body = this.getDualityViewBodyDdl(createViewDto); return heading + '\n' + body + '\n'; } diff --git a/forward_engineering/ddlProvider/templates.js b/forward_engineering/ddlProvider/templates.js index c31cc41d..08ce9a04 100644 --- a/forward_engineering/ddlProvider/templates.js +++ b/forward_engineering/ddlProvider/templates.js @@ -61,7 +61,7 @@ module.exports = { dualityView: { createJsonRelationalDualityViewHeading: - 'CREATE${orReplaceStatement}${forceStatement}${editionableStatement} JSON RELATIONAL DUALITY VIEW ${viewName} AS', + 'CREATE${orReplaceStatement}${forceStatement}${editionableStatement} JSON RELATIONAL DUALITY VIEW ${viewName}${annotations} AS', sql: { tableTagsStatement: From 83e19b7afc29b97bdc34b4f6d60ac97d4ab9da86 Mon Sep 17 00:00:00 2001 From: Ivan Date: Thu, 26 Feb 2026 15:46:57 +0100 Subject: [PATCH 7/7] HCK-14983: add index annotations (#237) * HCK-14983: add index annotations * HCK-14983: update index template --- forward_engineering/ddlProvider/ddlProvider.js | 6 +++++- forward_engineering/ddlProvider/templates.js | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/forward_engineering/ddlProvider/ddlProvider.js b/forward_engineering/ddlProvider/ddlProvider.js index d4ae6e29..577bdb47 100644 --- a/forward_engineering/ddlProvider/ddlProvider.js +++ b/forward_engineering/ddlProvider/ddlProvider.js @@ -494,7 +494,7 @@ module.exports = (baseProvider, options, app) => { }, hydrateIndex(indexData, tableData, schemaData) { - return { ...indexData, schemaName: schemaData.schemaName }; + return { ...indexData, schemaName: schemaData.schemaName, indexAnnotations: indexData.indexAnnotations }; }, createIndex(tableName, index, dbData, isParentActivated = true) { @@ -510,6 +510,9 @@ module.exports = (baseProvider, options, app) => { const dbVersion = options.dbVersion || ''; const usingTryCatchWrapper = shouldUseTryCatchIfNotExistsWrapper(dbVersion); + const annotations = getAnnotationsString(prepareName)(index.indexAnnotations); + const finalAnnotationsClause = annotations ? ' ' + annotations : ''; + const shouldInsertIfNotExistsStatement = index.ifNotExist && !usingTryCatchWrapper; let statement = assignTemplates(templates.createIndex, { @@ -519,6 +522,7 @@ module.exports = (baseProvider, options, app) => { keys, options: indexOptions, tableName: getNamePrefixedWithSchemaName(tableName, index.schemaName), + annotations: finalAnnotationsClause, }); if (index.ifNotExist && usingTryCatchWrapper) { diff --git a/forward_engineering/ddlProvider/templates.js b/forward_engineering/ddlProvider/templates.js index 08ce9a04..d2848319 100644 --- a/forward_engineering/ddlProvider/templates.js +++ b/forward_engineering/ddlProvider/templates.js @@ -20,7 +20,7 @@ module.exports = { createForeignKey: 'ALTER TABLE ${foreignTable} ADD CONSTRAINT ${name} FOREIGN KEY (${foreignKey}) REFERENCES ${primaryTable} (${primaryKey})${onDelete};', - createIndex: `CREATE$\{indexType} INDEX$\{ifNotExists}$\{name} ON $\{tableName}$\{keys}$\{options};\n`, + createIndex: 'CREATE${indexType} INDEX${ifNotExists}${name} ON ${tableName}${keys}${options}${annotations};\n', dropIndex: 'DROP INDEX ${name};',