Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion forward_engineering/ddlProvider/ddlProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 : '';
Expand Down
2 changes: 1 addition & 1 deletion forward_engineering/ddlProvider/templates.js
Original file line number Diff line number Diff line change
@@ -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',

Expand Down
43 changes: 43 additions & 0 deletions properties_pane/container_level/containerLevelConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions properties_pane/entity_level/entityLevelConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
40 changes: 24 additions & 16 deletions properties_pane/field_level/fieldLevelConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ making sure that you maintain a proper JSON format.
}

*/

{
"lowerTab": "Details",
"structure": {
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -11183,9 +11182,18 @@ making sure that you maintain a proper JSON format.
},
"options": [
"",
{ "name": "int8", "value": "vector<int8>" },
{ "name": "float32", "value": "vector<float32>" },
{ "name": "float64", "value": "vector<float64>" }
{
"name": "int8",
"value": "vector<int8>"
},
{
"name": "float32",
"value": "vector<float32>"
},
{
"name": "float64",
"value": "vector<float64>"
}
]
},
{
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions properties_pane/view_level/viewLevelConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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,
Expand Down