diff --git a/forward_engineering/ddlProvider/ddlProvider.js b/forward_engineering/ddlProvider/ddlProvider.js index 577bdb4..269655c 100644 --- a/forward_engineering/ddlProvider/ddlProvider.js +++ b/forward_engineering/ddlProvider/ddlProvider.js @@ -135,18 +135,22 @@ module.exports = (baseProvider, options, app) => { synonyms: data.synonyms, sequences: data.sequences, isActivated: containerData.isActivated, + schemaAnnotations: containerData.schemaAnnotations, }; }, - createSchema({ schemaName, ifNotExist, dbVersion, sequences, isActivated = true }) { + createSchema({ schemaName, ifNotExist, dbVersion, sequences, isActivated = true, schemaAnnotations }) { const emptyLineSeparator = '\n\n'; const statementTerminator = ';'; + const annotations = getAnnotationsString(prepareName)(schemaAnnotations); + const finalAnnotationsClause = annotations ? ' ' + annotations : ''; const preparedSchemaName = prepareName(schemaName); const usingTryCatchWrapper = shouldUseTryCatchIfNotExistsWrapper(dbVersion); const schemaStatement = assignTemplates(templates.createSchema, { schemaName: preparedSchemaName, ifNotExists: !usingTryCatchWrapper && ifNotExist ? ' IF NOT EXISTS' : '', + annotations: finalAnnotationsClause, }); const sequencesStatement = getSequencesScript({ schemaName, sequences, usingTryCatchWrapper }); const schemaSequencesStatement = sequencesStatement ? emptyLineSeparator + sequencesStatement : ''; diff --git a/forward_engineering/ddlProvider/templates.js b/forward_engineering/ddlProvider/templates.js index d284831..7e9feea 100644 --- a/forward_engineering/ddlProvider/templates.js +++ b/forward_engineering/ddlProvider/templates.js @@ -1,5 +1,5 @@ module.exports = { - createSchema: 'CREATE USER${ifNotExists} ${schemaName} NO AUTHENTICATION', + createSchema: 'CREATE USER${ifNotExists} ${schemaName}${annotations} NO AUTHENTICATION', comment: '\nCOMMENT ON ${object} ${objectName} IS ${comment};\n', diff --git a/properties_pane/container_level/containerLevelConfig.json b/properties_pane/container_level/containerLevelConfig.json index b63cd87..ed648a8 100644 --- a/properties_pane/container_level/containerLevelConfig.json +++ b/properties_pane/container_level/containerLevelConfig.json @@ -244,6 +244,49 @@ making sure that you maintain a proper JSON format. } ] }, + { + "propertyName": "Annotations", + "propertyKeyword": "schemaAnnotations", + "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": "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": { + "regex": "^(?=.*?\\d)?(?=.*?[a-zA-Z])?[^\\.,\\-=/:\\s][^\\.,\\-=/:]{1,1024}[^\\.,\\-=/:\\s]$" + } + }, + { + "propertyName": "Value", + "propertyKeyword": "annotationValue", + "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/entity_level/entityLevelConfig.json b/properties_pane/entity_level/entityLevelConfig.json index 3e54d6f..be4eddc 100644 --- a/properties_pane/entity_level/entityLevelConfig.json +++ b/properties_pane/entity_level/entityLevelConfig.json @@ -922,7 +922,7 @@ making sure that you maintain a proper JSON format. { "propertyName": "Value", "propertyKeyword": "annotationValue", - "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", "markdown": false, @@ -1244,7 +1244,7 @@ making sure that you maintain a proper JSON format. { "propertyName": "Value", "propertyKeyword": "annotationValue", - "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", "markdown": false, diff --git a/properties_pane/field_level/fieldLevelConfig.json b/properties_pane/field_level/fieldLevelConfig.json index 377146b..b24ec70 100644 --- a/properties_pane/field_level/fieldLevelConfig.json +++ b/properties_pane/field_level/fieldLevelConfig.json @@ -113,7 +113,6 @@ making sure that you maintain a proper JSON format. } */ - { "lowerTab": "Details", "structure": { @@ -2138,7 +2137,7 @@ making sure that you maintain a proper JSON format. { "propertyName": "Value", "propertyKeyword": "annotationValue", - "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", "markdown": false, @@ -4172,7 +4171,7 @@ making sure that you maintain a proper JSON format. { "propertyName": "Value", "propertyKeyword": "annotationValue", - "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", "markdown": false, @@ -5958,7 +5957,7 @@ making sure that you maintain a proper JSON format. { "propertyName": "Value", "propertyKeyword": "annotationValue", - "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", "markdown": false, @@ -6787,7 +6786,7 @@ making sure that you maintain a proper JSON format. { "propertyName": "Value", "propertyKeyword": "annotationValue", - "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", "markdown": false, @@ -8017,7 +8016,7 @@ making sure that you maintain a proper JSON format. { "propertyName": "Value", "propertyKeyword": "annotationValue", - "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", "markdown": false, @@ -9445,7 +9444,7 @@ making sure that you maintain a proper JSON format. { "propertyName": "Value", "propertyKeyword": "annotationValue", - "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", "markdown": false, @@ -11116,7 +11115,7 @@ making sure that you maintain a proper JSON format. { "propertyName": "Value", "propertyKeyword": "annotationValue", - "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", "markdown": false, @@ -11183,9 +11182,18 @@ making sure that you maintain a proper JSON format. }, "options": [ "", - { "name": "int8", "value": "vector" }, - { "name": "float32", "value": "vector" }, - { "name": "float64", "value": "vector" } + { + "name": "int8", + "value": "vector" + }, + { + "name": "float32", + "value": "vector" + }, + { + "name": "float64", + "value": "vector" + } ] }, { @@ -11293,7 +11301,7 @@ making sure that you maintain a proper JSON format. { "propertyName": "Value", "propertyKeyword": "annotationValue", - "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", "markdown": false, @@ -12167,7 +12175,7 @@ making sure that you maintain a proper JSON format. { "propertyName": "Value", "propertyKeyword": "annotationValue", - "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", "markdown": false, @@ -12709,7 +12717,7 @@ making sure that you maintain a proper JSON format. { "propertyName": "Value", "propertyKeyword": "annotationValue", - "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", "markdown": false, @@ -13495,7 +13503,7 @@ making sure that you maintain a proper JSON format. { "propertyName": "Value", "propertyKeyword": "annotationValue", - "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", "markdown": false, @@ -14049,7 +14057,7 @@ making sure that you maintain a proper JSON format. { "propertyName": "Value", "propertyKeyword": "annotationValue", - "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", "markdown": false, diff --git a/properties_pane/view_level/viewLevelConfig.json b/properties_pane/view_level/viewLevelConfig.json index b934769..dfab93a 100644 --- a/properties_pane/view_level/viewLevelConfig.json +++ b/properties_pane/view_level/viewLevelConfig.json @@ -6,7 +6,6 @@ * IntegrIT S.A. or in accordance with the terms and conditions stipulated in * the agreement/contract under which the software has been supplied. */ - [ { "lowerTab": "Details", @@ -713,7 +712,7 @@ { "propertyName": "Value", "propertyKeyword": "annotationValue", - "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", + "propertyTooltip": "The value of the annotation is optionsal. Value can have a maximum of 4000 characters.", "propertyType": "details", "template": "textarea", "markdown": false,