From 52220cc2e01ac97872912160f36ae9556a968388 Mon Sep 17 00:00:00 2001 From: Serhii Filonenko <91055067+serhii-filonenko@users.noreply.github.com> Date: Thu, 25 Jan 2024 18:46:29 +0200 Subject: [PATCH] Feature/hck 3428 add configuration to match the new storage model (#3) * localization: fix naming for scopes and collections * types: add number type * configuration: add container/entity/field level config for scopes and collections * bump copyright year * entity-level-config: add more specific property tooltips * field-level-config: fix key for number structure --- LICENSE | 2 +- central_pane/dtdAbbreviation.json | 9 +- localization/en.json | 134 +++++---- .../container_level/containerLevelConfig.json | 184 +++++++++++- properties_pane/defaultData.json | 13 +- .../entity_level/entityLevelConfig.json | 284 +++++++++++++++--- .../field_level/fieldLevelConfig.json | 11 +- .../view_level/viewLevelConfig.json | 2 +- types/{numeric.json => number.json} | 25 +- 9 files changed, 508 insertions(+), 156 deletions(-) rename types/{numeric.json => number.json} (65%) diff --git a/LICENSE b/LICENSE index 425bd4e..159e774 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ - Copyright 2016-2022 IntegrIT SA/NV dba Hackolade + Copyright 2016-2024 IntegrIT SA/NV dba Hackolade Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/central_pane/dtdAbbreviation.json b/central_pane/dtdAbbreviation.json index 787bb5e..04c13aa 100644 --- a/central_pane/dtdAbbreviation.json +++ b/central_pane/dtdAbbreviation.json @@ -8,11 +8,6 @@ * */ { - "map": "{...}", - "list": "[...]", - "string": "{ABC}", - "number": "{123}", - "bool": "{0/1}", - "bytes": "{BYTES}", - "null": "{null}" + "number": { "abbr": "" }, + "object": { "abbr": "" } } diff --git a/localization/en.json b/localization/en.json index 9440ec7..365c07c 100644 --- a/localization/en.json +++ b/localization/en.json @@ -1,5 +1,5 @@ { - "WELCOME_PAGE___REVERSE_ENGINEER_DESCRIPTION": "Create a Hackolade model from an existing DB instance", + "WELCOME_PAGE___REVERSE_ENGINEER_DESCRIPTION": "Create a Hackolade Studio model from an existing target instance", "MAIN_MENU___ADD_BUCKET": "Add Scope", "MAIN_MENU___ADD_COLLECTION": "Add Collection", "MAIN_MENU___ADD_VIEW": "Add View", @@ -19,15 +19,39 @@ "TOOLBAR___SHOW_FOREIGN_MASTER": "Toggle foreign master", "TOOLBAR___SHOW_MODEL_VIEW": "Toggle model views", "TOOLBAR___DISTRIBUTE_ORTHOGONALLY": "Distribute collections orthogonally", - "OBJECT___BROWSER_BUCKET": "Scope", - "OBJECT___BROWSER_NOT_IN_BUCKET": "Undefined scope", + "OBJECT___BROWSER_BUCKET": "Scopes", + "OBJECT___BROWSER_NOT_IN_BUCKET": "Undefined Scope", "OBJECT___BROWSER_COLLECTION": "Collections", "OBJECT___BROWSER_VIEWS": "Views", "OBJECT___BROWSER_DEFINITIONS": "Definitions", "OBJECT___BROWSER_FIELDS": "Fields", + "OBJECT___BROWSER_NESTED_COLLECTIONS": "Nested collections", + "OBJECT___BROWSER_EXTERNAL_DEFINITIONS": "External Definitions", "PROPERTIES_PANE___BUCKET_NAME": "Scope name", + "PROPERTIES_PANE___BUCKET_KEY": "Key", + "PROPERTIES_PANE___BUCKET_KEY_NAME": "name", + "PROPERTIES_PANE___BUCKET_KEY_TYPE": "type", + "PROPERTIES_PANE___BUCKET_DOC_KIND": "Collection", + "PROPERTIES_PANE___BUCKET_TYPE": "Scope type", + "PROPERTIES_PANE___BUCKET_MEMORY_SIZE": "Memory size", + "PROPERTIES_PANE___BUCKET_RAM_QUOTA": "Per node RAM quota", + "PROPERTIES_PANE___BUCKET_ACCESS_CONTROL": "Access Control", + "PROPERTIES_PANE___BUCKET_PROTOCOL_PORT": "Protocol Port", + "PROPERTIES_PANE___BUCKET_FLUSH": "FLUSH", + "PROPERTIES_PANE___BUCKET_FLUSH_ENABLE": "Enable", "PROPERTIES_PANE___VIEW_NAME": "View name", - "PROPERTIES_PANE___COLLECTION_NAME": "Collection", + "PROPERTIES_PANE___BUCKET_CASH_METADATA": "Cache Metadata", + "PROPERTIES_PANE___BUCKET_CONFLICT_RESOLUTION": "Conflict resolution", + "PROPERTIES_PANE___BUCKET_REPLICAS": "Replicas", + "PROPERTIES_PANE___BUCKET_REPLICAS_ENABLE": "Enable", + "PROPERTIES_PANE___BUCKET_REPLICAS_NUMBER": "Number", + "PROPERTIES_PANE___BUCKET_REPLICAS_VIEW_INDEX": "View index replicas", + "PROPERTIES_PANE___BUCKET_DISK_OPTIMISATION": "Disk I/O optimization", + "PROPERTIES_PANE___BUCKET_IO_PRIORITY": "Disk I/O priority", + "PROPERTIES_PANE___BUCKET_AUTO_COMPACTION": "Auto-Compaction", + "PROPERTIES_PANE___BUCKET_OVERRIDE_DEFAULT": "Override default", + "PROPERTIES_PANE___PRIMARY_KEY": "Primary key", + "PROPERTIES_PANE___COLLECTION_NAME": "Collection name", "PROPERTIES_PANE___FOREIGN_COLLECTION": "Foreign collection", "PROPERTIES_PANE___FOREIGN_FIELD": "Foreign field", "PROPERTIES_PANE___PARENT_COLLECTION": "Parent collection", @@ -36,55 +60,60 @@ "PROPERTIES_PANE___CHILD_COLLECTION": "Child collection", "PROPERTIES_PANE___CHILD_FIELD": "Child field", "PROPERTIES_PANE___CHILD_CARDINALITY": "Child cardinality", - "PROPERTIES_PANE___PRIMARY_KEY": "Primary key", "PROPERTIES_PANE___COLLECTION_BUCKET": "Scope", - "PROPERTIES_PANE___VIEW_ON": "View on", - "PROPERTIES_PANE___PIPELINE": "Pipeline", - "PROPERTIES_PANE___COLLATION": "Collation", - "PROPERTIES_PANE___LOCALE": "Locale", - "PROPERTIES_PANE___VARIANT": "Variant", - "PROPERTIES_PANE___STRENGTH": "Strength", - "PROPERTIES_PANE___CASE_LEVEL": "Case level", - "PROPERTIES_PANE___CASE_FIRST": "Case first", - "PROPERTIES_PANE___NUMERIC_ORDERING": "Numeric ordering", - "PROPERTIES_PANE___ALTERNATE": "Alternate", - "PROPERTIES_PANE___MAX_VARIABLE": "Max variable", - "PROPERTIES_PANE___BACKWARDS": "Backwards", - "PROPERTIES_PANE___NORMALIZATION": "Normalization", - "CENTRAL_PANE___TAB_MONGODB_VIEW_SCRIPT": "Create View Script", - "CONTEXT_MENU___ADD_BUCKET": "Add Scope", - "CONTEXT_MENU___ADD_COLLECTION": "Add Collection", - "CONTEXT_MENU___ADD_VIEW": "Add View", - "CONTEXT_MENU___ALIGN_COLLECTIONS": "Align Collections", + "PROPERTIES_PANE___KEYS": "Keys", + "PROPERTIES_PANE___ARRAY_EXPRESSION": "Array expression", + "PROPERTIES_PANE___METADATA_EXPRESSION": "Metadata expression", + "PROPERTIES_PANE___PARTITION_BY_HASH": "Partition by hash", + "PROPERTIES_PANE___PARTITION_BY_HASH_KEYS": "Partition by hash keys", + "PROPERTIES_PANE___PARTITION_BY_HASH_CLAUSE": "Partition by hash clause", + "PROPERTIES_PANE___WHERE_CLAUSE": "WHERE clause", + "PROPERTIES_PANE___USING_GSI": "Using GSI", + "PROPERTIES_PANE___NODE_NAME": "Node name", + "PROPERTIES_PANE___NODES": "Nodes", + "PROPERTIES_PANE___DEFER_BUILD": "Defer build", + "PROPERTIES_PANE___NUMBER_OF_REPLICAS": "Nbr of replicas", + "PROPERTIES_PANE___WITH_OPTIONS": "WITH options", + "CONTEXT_MENU___ADD_BUCKET": "Add scope", + "CONTEXT_MENU___ADD_COLLECTION": "Add collection", + "CONTEXT_MENU___ALIGN_COLLECTIONS": "Align collections", "CONTEXT_MENU___ADD_ATTRIBUTE": "Add Attribute", "CONTEXT_MENU___INSERT_ATTRIBUTE": "Insert Attribute", "CONTEXT_MENU___APPEND_ATTRIBUTE": "Append Attribute", - "CONTEXT_MENU___OPEN_COLLECTION_IN_NEW_TAB": "Open collection in new tab", + "CONTEXT_MENU___OPEN_COLLECTION_IN_NEW_TAB": "Open Collection In New Tab", "CONTEXT_MENU___FIELD": "Field", "CONTEXT_MENU___PATTERN_FIELD": "Pattern Field", "CONTEXT_MENU___ARRAY_ITEM": "Array Item", - "MODAL_WINDOW___COLLECTION": "Collection:", + "CONTEXT_MENU___CONVERT_TO_PATTERN_FIELD": "Convert to Pattern Field", + "CONTEXT_MENU___CONVERT_PATTERN_TO_REGULAR_FIELD": "Convert to Regular Field", + "MODAL_WINDOW___PRINT_DIALOG_LABEL_COLLECTION": "Collection", "MODAL_WINDOW___EMPTY_MODEL_MESSAGE": "The Model does not contain any collections.", "MODAL_WINDOW___FIELD_INFERENCE": "Field Inference", "MODAL_WINDOW___KEEP_FIELD_ORDER": "Keep field order", - "MODAL_WINDOW___CANNOT_CONNECT_TO_DB": "Cannot connect to Couchbase", + "MODAL_WINDOW___CANNOT_CONNECT_TO_DB": "Cannot connect to Couchbase (check your host, port, and if your IP is whitelisted)", "MODAL_WINDOW___SUCCESSFULLY_CONNECT_TO_DB": "Successfully connected to Couchbase", "MODAL_WINDOW___UNABLE_CONNECT_TO_DB": "Unable to connect to Couchbase", + "MODAL_WINDOW___DB_CONNECTION_PROCESS": "Couchbase Reverse-Engineering Process", "MODAL_WINDOW___DB_CONNECTIONS_LIST_TITLE": "Couchbase Connections", "MODAL_WINDOW___DB_ENTITIES_SELECTION_TITLE": "collection selection", "MODAL_WINDOW___RECORDS_MAX": "documents max", "MODAL_WINDOW___SUBDOCUMENT_IN_CHILD": "Sub-document in child", "MODAL_WINDOW___ARRAY_IN_PARENT": "Array in parent", - "MODAL_WINDOW___INCLUDE_EMPTY_COLLECTION": "Include empty collections", - "MODAL_WINDOW___CREATE_COLLECTION": "Create collection", - "MODAL_WINDOW___CREATE_BUCKET": "Create scope", + "MODAL_WINDOW___CREATE_COLLECTION": "Create Couchbase Collection", + "MODAL_WINDOW___INCLUDE_EMPTY_COLLECTION": "Include empty documents", + "MODAL_WINDOW___CREATE_BUCKET": "Create Couchbase Scope", "MODAL_WINDOW___ALL_COLLECTIONS": "and all nested collections", - "MODAL_WINDOW___CONNENTION_ERROR": "The Couchbase instance you are connected to does not contain any collections.", - "MODAL_WINDOW___CONTAIN_BUCKETS": "scopes", + "MODAL_WINDOW___COLLECTION_NAME_ERROR": "Collection name is empty or is a reserved word", + "MODAL_WINDOW___COLLECTION_MOVING_ERROR": "Error moving Collection", + "MODAL_WINDOW___COLLECTION_MOVING_ERROR_CONTENT": "The target scope has different Key or Collection field than current", + "MODAL_WINDOW___CONNENTION_ERROR": "The Couchbase instance you are connected to does not contain any Scopes.", "MODAL_WINDOW___CONTAIN_COLLECTIONS": "collections", - "MODAL_WINDOW___CONTAIN_BUCKET": "scope", + "MODAL_WINDOW___CONTAIN_BUCKETS": "scopes", + "MODAL_WINDOW___CONTAIN_VIEWS": "views", "MODAL_WINDOW___CONTAIN_COLLECTION": "collection", - "MODAL_WINDOW___DB_CONNECTION_PROCESS": "Couchbase Reverse-Engineering Process", + "MODAL_WINDOW___CONTAIN_BUCKET": "scope", + "MODAL_WINDOW___CONTAIN_VIEW": "view", + "MODAL_WINDOW___COLLECTION": "Collection", "PROGRESS_BAR___DATABASE": "Scope", "PROGRESS_BAR___COLLECTION": "Collection", "PROGRESS_BAR___PROCESS": "Process", @@ -102,41 +131,24 @@ "DOCUMENTATION___FIELDS": "Fields", "DOCUMENTATION___CHILD_FIELDS": "Child field(s)", "DOCUMENTATION___PHYSICAL_MODEL": "Couchbase Physical Model", - "DOCUMENTATION___VIEWS": "Views", - "DOCUMENTATION___VIEW": "View", "TOOLTIPS___FOREIGN_COLLECTION": "foreign collection", - "TOOLTIPS___COLLECTION_BUCKET": "Scope", + "TOOLTIPS___COLLECTION_BUCKET": "scope", "TOOLTIPS___FOREIGN_FIELD": "foreign field", "TOOLTIPS___PARENT_COLLECTION": "parent collection", "TOOLTIPS___PARENT_FIELD": "parent field", "TOOLTIPS___CHILD_COLLECTION": "child collection", "TOOLTIPS___CHILD_FIELD": "child field", - "TOOLTIPS___VIEW_ON": "view on", - "TOOLTIPS___PIPELINE": "pipeline", - "TOOLTIPS___COLLATION": "collation", - "TOOLTIPS___LOCALE": "locale", - "TOOLTIPS___VARIANT": "variant", - "TOOLTIPS___STRENGTH": "strength", - "TOOLTIPS___CASE_LEVEL": "case level", - "TOOLTIPS___CASE_FIRST": "case first", - "TOOLTIPS___NUMERIC_ORDERING": "numeric ordering", - "TOOLTIPS___ALTERNATE": "alternate", - "TOOLTIPS___MAX_VARIABLE": "max variable", - "TOOLTIPS___BACKWARDS": "Backwards", - "TOOLTIPS___NORMALIZATION": "Normalization", - "NEW___MODEL_NAME": "New model", - "NEW___BUCKET_NAME": "New scope", - "NEW___COLLECTION_NAME": "New collection", + "TOOLTIPS___CHILD_COLLECTION_MESSAGE": "No collections to add", + "NEW___MODEL_NAME": "New Model", + "NEW___COLLECTION_NAME": "New Collection", + "NEW___BUCKET_NAME": "New Scope", "NEW___FIELD_NAME": "New Field", - "NEW___PATTERN_FIELD_NAME": "^New Pattern Field$", + "NEW___PATTERN_FIELD_NAME": "^[a-zA-Z0-9_.-]+$", "COLLECTION_SCHEMA_DEFINITION_NAME": "Collection definitions", "COLLECTION_SCHEMA_DEFINITION_TYPE": "document", - "MONGODB_SCRIPT_WARNING_MESSAGE": "This view is not associated to a collection (viewOn property).", - "TYPE": {}, - "MODAL_WINDOW___SELECTION_DOCUMENT_KIND_REVERSE_ENGINEERING_TITLE": "Select collection field", - "MODAL_WINDOW___SELECTION_DOCUMENT_KIND_REVERSE_ENGINEERING": "No collection separation", - "CONTEXT_MENU___CONVERT_TO_PATTERN_FIELD": "Convert to Pattern Field", - "CONTEXT_MENU___CONVERT_PATTERN_TO_REGULAR_FIELD": "Convert to Regular Field", - "CENTRAL_PANE___FE_SCRIPT": "MongoDB script", - "MAIN_MENU___FORWARD_DB_BUCKETS": "MongoDB script" + "PLUGIN_MANAGER___CUSTOM_PROPERTIES_DESCRIPTION": "Custom properties for Couchbase", + + "TYPE": { + "document": "object" + } } diff --git a/properties_pane/container_level/containerLevelConfig.json b/properties_pane/container_level/containerLevelConfig.json index 5ba1638..c7c7c7d 100644 --- a/properties_pane/container_level/containerLevelConfig.json +++ b/properties_pane/container_level/containerLevelConfig.json @@ -1,5 +1,5 @@ /* -* Copyright © 2016-2019 by IntegrIT S.A. dba Hackolade. All rights reserved. +* Copyright © 2016-2024 by IntegrIT S.A. dba Hackolade. All rights reserved. * * The copyright to the computer software herein is the property of IntegrIT S.A. * The software may be used and/or copied only with the written permission of @@ -113,7 +113,6 @@ making sure that you maintain a proper JSON format. } */ - [ { "lowerTab": "Details", @@ -122,14 +121,14 @@ making sure that you maintain a proper JSON format. { "propertyKeyword": "name", "validation": { - "regex": "^[\\s\\S]{1,63}$", + "regex": "^(^\\b_default\\b$|(?!(_|%))[a-zA-Z0-9%_\\-]{1,251})$", "required": true } }, { "propertyKeyword": "code", "validation": { - "regex": "^[\\s\\S]{1,63}$" + "regex": "^(^\\b_default\\b$|(?!(_|%))[a-zA-Z0-9%_\\-]{1,251})$" } }, { @@ -157,8 +156,8 @@ making sure that you maintain a proper JSON format. } }, { - "propertyName": "If not exist", - "propertyKeyword": "ifNotExist", + "propertyName": "If not exists", + "propertyKeyword": "ifNotExists", "propertyTooltip": "This optional clause enables the statement to complete successfully when the specified scope already exists.", "defaultValue": true, "propertyType": "checkbox" @@ -169,6 +168,179 @@ making sure that you maintain a proper JSON format. "propertyTooltip": "comments", "propertyType": "details", "template": "textarea" + }, + { + "propertyName": "Bucket type", + "propertyKeyword": "bucketType", + "shouldValidate": false, + "propertyTooltip": "bucket type", + "propertyType": "select", + "options": ["Couchbase", "Memcached"] + }, + { + "propertyName": "Storage Engine", + "propertyKeyword": "storageEngine", + "shouldValidate": false, + "propertyTooltip": "Storage Engine", + "propertyType": "select", + "options": ["Couchstore", "Magma"] + }, + { + "propertyName": "Memory size", + "propertyKeyword": "type", + "shouldValidate": false, + "propertyType": "empty" + }, + { + "propertyName": "Per node RAM quota", + "propertyKeyword": "ramQuota", + "shouldValidate": true, + "propertyTooltip": "Per node RAM quota", + "propertyType": "text", + "labelOffset": 50, + "number": true + }, + { + "propertyName": "Cache Metadata", + "propertyKeyword": "cacheMetadata", + "shouldValidate": false, + "propertyTooltip": "cache metadata", + "propertyType": "select", + "options": ["Value ejection", "Full ejection"], + "labelOffset": 50, + "dependency": { + "key": "bucketType", + "value": "Couchbase" + } + }, + { + "propertyName": "Access Control", + "propertyKeyword": "accessControl", + "shouldValidate": false, + "propertyTooltip": "cache metadata", + "propertyType": "select", + "options": ["Standart port", "Dedicated port"] + }, + { + "propertyName": "Protocol Port", + "propertyKeyword": "protocolPort", + "shouldValidate": false, + "propertyTooltip": "cache metadata", + "propertyType": "text", + "labelOffset": 50, + "dependency": { + "key": "accessControl", + "value": "Dedicated port" + } + }, + { + "propertyName": "Conflict resolution", + "propertyKeyword": "conflictResolution", + "shouldValidate": false, + "propertyTooltip": "cache metadata", + "propertyType": "select", + "options": ["Sequence number", "Timestamp"], + "dependency": { + "key": "bucketType", + "value": "Couchbase" + } + }, + { + "propertyName": "Replicas", + "propertyKeyword": "replicas", + "shouldValidate": false, + "propertyType": "empty", + "dependency": { + "key": "bucketType", + "value": "Couchbase" + } + }, + { + "propertyName": "Enable", + "propertyKeyword": "replicasEnable", + "shouldValidate": false, + "propertyType": "checkbox", + "dependency": { + "key": "bucketType", + "value": "Couchbase" + } + }, + { + "propertyName": "Number", + "propertyKeyword": "replicasNumber", + "shouldValidate": false, + "propertyType": "text", + "dependency": { + "key": "bucketType", + "value": "Couchbase" + }, + "number": true + }, + { + "propertyName": "View index replicas", + "propertyKeyword": "replicasViewIndex", + "shouldValidate": false, + "propertyType": "checkbox", + "dependency": { + "key": "bucketType", + "value": "Couchbase" + } + }, + { + "propertyName": "Disk I/O optimisation", + "propertyKeyword": "diskOptimisation", + "shouldValidate": false, + "propertyType": "empty", + "dependency": { + "key": "bucketType", + "value": "Couchbase" + } + }, + { + "propertyName": "Disk I/O priority", + "propertyKeyword": "bucketIOPriority", + "shouldValidate": false, + "propertyTooltip": "bucket I/P priority", + "propertyType": "select", + "options": ["Low (Default)", "High"], + "labelOffset": 50, + "dependency": { + "key": "bucketType", + "value": "Couchbase" + } + }, + { + "propertyName": "Auto-Compaction", + "propertyKeyword": "autoCompaction", + "shouldValidate": false, + "propertyType": "empty", + "dependency": { + "key": "bucketType", + "value": "Couchbase" + } + }, + { + "propertyName": "Override default", + "propertyKeyword": "overrideDefault", + "shouldValidate": false, + "propertyType": "checkbox", + "dependency": { + "key": "bucketType", + "value": "Couchbase" + } + }, + { + "propertyName": "FLUSH", + "propertyKeyword": "flush", + "shouldValidate": false, + "propertyTooltip": "memory size", + "propertyType": "empty" + }, + { + "propertyName": "Enable", + "propertyKeyword": "flushEnable", + "shouldValidate": false, + "propertyType": "checkbox" } ] } diff --git a/properties_pane/defaultData.json b/properties_pane/defaultData.json index dbfa6c3..567bf56 100644 --- a/properties_pane/defaultData.json +++ b/properties_pane/defaultData.json @@ -15,10 +15,19 @@ }, "container": { "name": "New scope", - "indexes": [] + "bucketType": "Couchbase", + "ramQuota": 100, + "cacheMetadata": "Value ejection", + "accessControl": "Standart port", + "password": "", + "conflictResolution": "Sequence number", + "replicasNumber": 1, + "bucketIOPriority": "Low (Default)", + "storageEngine": "Couchstore" }, "collection": { - "collectionName": "New collection" + "collectionName": "New collection", + "indexes": [] }, "field": { "name": "New field" diff --git a/properties_pane/entity_level/entityLevelConfig.json b/properties_pane/entity_level/entityLevelConfig.json index 2a54cd6..afca323 100644 --- a/properties_pane/entity_level/entityLevelConfig.json +++ b/properties_pane/entity_level/entityLevelConfig.json @@ -1,5 +1,5 @@ /* -* Copyright © 2016-2019 by IntegrIT S.A. dba Hackolade. All rights reserved. +* Copyright © 2016-2024 by IntegrIT S.A. dba Hackolade. All rights reserved. * * The copyright to the computer software herein is the property of IntegrIT S.A. * The software may be used and/or copied only with the written permission of @@ -121,14 +121,14 @@ making sure that you maintain a proper JSON format. { "propertyKeyword": "collectionName", "validation": { - "regex": "^[\\s\\S]{1,57}$", + "regex": "^(^\\b_default\\b$|(?!(_|%))[a-zA-Z0-9%_\\-]{1,251})$", "required": true } }, { "propertyKeyword": "code", "validation": { - "regex": "^[\\s\\S]{1,57}$" + "regex": "^(^\\b_default\\b$|(?!(_|%))[a-zA-Z0-9%_\\-]{1,251})$" } }, { @@ -139,8 +139,8 @@ making sure that you maintain a proper JSON format. "template": "textarea" }, { - "propertyName": "If not exist", - "propertyKeyword": "ifNotExist", + "propertyName": "If not exists", + "propertyKeyword": "ifNotExists", "propertyTooltip": "This optional clause enables the statement to complete successfully when the specified collection already exists.", "defaultValue": true, "propertyType": "checkbox" @@ -159,80 +159,258 @@ making sure that you maintain a proper JSON format. "lowerTab": "Indexes", "structure": [ { - "propertyName": "Index", + "propertyName": "indexes", "propertyType": "group", - "propertyKeyword": "Indxs", + "propertyKeyword": "indexes", + "shouldValidate": false, "propertyTooltip": "Click + to add an index", "erdIndexAbbr": "I", "structure": [ { "propertyName": "Name", - "propertyKeyword": "name", - "propertyTooltip": "", - "propertyType": "text" + "propertyKeyword": "indxName", + "shouldValidate": true, + "propertyTooltip": "Index name", + "propertyType": "text", + "validation": { + "regex": "^(?!(_|#))[A-Za-z0-9#_]{1,}" + } }, { "propertyName": "Activated", "propertyKeyword": "isActivated", - "propertyTooltip": "Deactivated item will be not included in forward-engineering script", + "parentType": "indexes", "propertyType": "checkbox", - "defaultValue": true + "shouldValidate": false, + "propertyTooltip": "Deactivated item will be not included in forward-engineering script" + }, + { + "template": "textarea", + "propertyKeyword": "indxDescription", + "propertyName": "Description", + "propertyTooltip": "description", + "propertyType": "details", + "parentType": "indexes" }, { + "options": ["Primary", "Secondary", "Array", "Metadata"], + "propertyKeyword": "indxType", + "propertyName": "Type", + "propertyType": "select", + "parentType": "indexes" + }, + { + "propertyType": "tagInput", + + "template": "collectiontree", + "dependency": { + "key": "indxType", + "value": "Secondary" + }, + "propertyKeyword": "indxKey", "propertyName": "Keys", - "propertyKeyword": "key", - "propertyType": "fieldList", - "template": "orderedList", - "attributeList": ["ascending", "descending", "2DSphere"] + "types": ["ascending", "descending"], + "isCompositeKey": false, + "parentType": "indexes", + "templateOptions": { + "entityName": false + } }, { - "propertyName": "Unique", - "propertyKeyword": "unique", - "propertyType": "checkbox" + "template": "textarea", + "markdown": false, + "dependency": { + "key": "indxType", + "value": "Secondary" + }, + "propertyKeyword": "functionExpr", + "propertyName": "Function expression", + "propertyType": "details", + "parentType": "indexes" }, { - "propertyName": "Sparse", - "propertyKeyword": "sparse", - "propertyType": "checkbox" + "template": "textarea", + "markdown": false, + "dependency": { + "key": "indxType", + "value": "Array" + }, + "propertyKeyword": "arrayExpr", + "propertyName": "Array expression", + "propertyTooltip": "Lets you map and filter the elements or attributes of a collection, object, or objects. It evaluates to an array of the operand expression that satisfies the WHEN clause, if specified.", + "propertyType": "details", + "parentType": "indexes" }, { - "propertyName": "Background indexing", - "propertyKeyword": "background", - "propertyType": "checkbox" + "template": "textarea", + "markdown": false, + "dependency": { + "key": "indxType", + "value": "Metadata" + }, + "propertyKeyword": "metadataExpr", + "propertyName": "Metadata expression", + "propertyTooltip": "Enables you to return the metadata for a keyspace or document. To index a selected metadata field, you must use a nested expression containing the META() function and the required property, for example META().id.", + "propertyType": "details", + "parentType": "indexes" }, { - "propertyName": "Expire after (seconds)", - "propertyKeyword": "expireAfterSeconds", - "propertyType": "numeric", - "valueType": "number", - "allowNegative": false + "options": ["", "Keys", "Expression"], + "dependency": { + "key": "indxType", + "value": "Secondary" + }, + "propertyKeyword": "partitionByHash", + "propertyName": "Partition by hash", + "propertyType": "select", + "parentType": "indexes" + }, + { + "propertyType": "tagInput", + + "template": "collectiontree", + "dependency": { + "type": "and", + "values": [ + { + "key": "indxType", + "value": "Secondary" + }, + { + "key": "partitionByHash", + "value": "Keys" + } + ] + }, + "propertyKeyword": "partitionByHashKeys", + "propertyName": "Partition by hash keys", + "isCompositeKey": false, + "parentType": "indexes", + "templateOptions": { + "entityName": false + } + }, + { + "template": "textarea", + "markdown": false, + "dependency": { + "type": "and", + "values": [ + { + "key": "indxType", + "value": "Secondary" + }, + { + "key": "partitionByHash", + "value": "Expression" + } + ] + }, + "propertyKeyword": "partitionByHashExpr", + "propertyName": "Partition by hash clause", + "propertyTooltip": "A field or an expression over a field representing a partition key. ", + "propertyType": "details", + "parentType": "indexes" + }, + { + "template": "textarea", + "markdown": false, + "dependency": { + "type": "or", + "values": [ + { + "key": "indxType", + "value": "Secondary" + }, + { + "key": "indxType", + "value": "Array" + } + ] + }, + "propertyKeyword": "whereClause", + "propertyName": "WHERE clause", + "propertyTooltip": "Specifies predicates to qualify the subset of documents to include in the index.", + "propertyType": "details", + "parentType": "indexes" }, { - "propertyName": "2D Sphere", - "propertyKeyword": "2dsphere", - "propertyType": "block", - "propertyTooltip": "", "dependency": { - "key": "key.*.type", - "value": "2DSphere" + "type": "or", + "values": [ + { + "key": "indxType", + "value": "Primary" + }, + { + "key": "indxType", + "value": "Secondary" + }, + { + "key": "indxType", + "value": "Array" + } + ] }, + "propertyKeyword": "usingGSI", + "propertyName": "Using GSI", + "propertyTooltip": "In Couchbase Server 6.5 and later, the index type must be Global Secondary Index (GSI). The USING GSI keywords are optional and may be omitted.", + "propertyType": "checkbox", + "parentType": "indexes" + }, + { "structure": [ { - "propertyName": "Index version", - "propertyKeyword": "2dsphereIndexVersion", - "propertyTooltip": "Select from list of options", - "propertyType": "select", - "options": ["default", "Version 2", "Version 1"] + "addAction": "addCollectionGroupItem", + + "structure": [ + { + "inputPlaceholder": ":", + "propertyKeyword": "nodeName", + "propertyName": "Node name", + "propertyTooltip": "A node name passed to the nodes property must include the cluster administration port, by default 8091.", + "propertyType": "text", + "parentType": "nodes" + } + ], + "propertyKeyword": "nodes", + "propertyName": "Nodes", + "propertyTooltip": "An array of strings, each of which represents a node name.", + "propertyType": "group", + "parentType": "withOptions" + }, + { + "defaultValue": true, + "propertyKeyword": "defer_build", + "propertyName": "Defer build", + "propertyTooltip": "Deferring building of the index with multiple indexes can optimize the expensive scan operation.", + "propertyType": "checkbox", + "parentType": "withOptions" + }, + { + "valueType": "number", + "allowNegative": false, + "propertyKeyword": "num_replica", + "propertyName": "Nbr of replicas", + "propertyTooltip": "Should be less than the number of index nodes in the cluster", + "propertyType": "numeric", + "parentType": "withOptions" } - ] + ], + "propertyKeyword": "withOptions", + "propertyName": "WITH options", + "propertyTooltip": "Specifies additional options for index.", + "propertyType": "block", + "parentType": "indexes" }, { + "addTimestampButton": false, + "template": "textarea", + "propertyKeyword": "indxComments", "propertyName": "Comments", - "propertyKeyword": "indexComments", "propertyTooltip": "comments", - "addTimestampButton": false, "propertyType": "details", - "template": "textarea" + "parentType": "indexes" } ] } @@ -240,6 +418,7 @@ making sure that you maintain a proper JSON format. }, { "lowerTab": "Functions", + "hidden": true, "structure": [ { "propertyName": "Function", @@ -268,6 +447,17 @@ making sure that you maintain a proper JSON format. "defaultValue": true, "propertyType": "checkbox" }, + { + "propertyName": "If not exists", + "propertyKeyword": "ifNotExists", + "propertyTooltip": "This optional clause enables the statement to complete successfully when the specified function already exists.", + "defaultValue": true, + "propertyType": "checkbox", + "dependency": { + "key": "orReplace", + "value": false + } + }, { "propertyName": "Function body", "propertyKeyword": "functionBody", @@ -285,8 +475,8 @@ making sure that you maintain a proper JSON format. "markdown": false }, { - "propertyName": "If not exist", - "propertyKeyword": "ifNotExist", + "propertyName": "If not exists", + "propertyKeyword": "ifNotExists", "propertyTooltip": "This optional clause enables the statement to complete successfully when the specified function already exists.", "defaultValue": true, "propertyType": "checkbox", diff --git a/properties_pane/field_level/fieldLevelConfig.json b/properties_pane/field_level/fieldLevelConfig.json index 67c357f..460f4ea 100644 --- a/properties_pane/field_level/fieldLevelConfig.json +++ b/properties_pane/field_level/fieldLevelConfig.json @@ -1,5 +1,5 @@ /* -* Copyright © 2016-2023 by IntegrIT S.A. dba Hackolade. All rights reserved. +* Copyright © 2016-2024 by IntegrIT S.A. dba Hackolade. All rights reserved. * * The copyright to the computer software herein is the property of IntegrIT S.A. * The software may be used and/or copied only with the written permission of @@ -148,7 +148,7 @@ making sure that you maintain a proper JSON format. "sample", "comments" ], - "numeric": [ + "number": [ { "fieldKeyword": "name", "validation": { @@ -165,13 +165,6 @@ making sure that you maintain a proper JSON format. "schemaId", "description", "type", - { - "propertyName": "Subtype", - "propertyKeyword": "mode", - "propertyTooltip": "Select from list of options", - "propertyType": "select", - "options": ["", "int32", "int64", "double"] - }, "minimum", "exclusiveMinimum", "maximum", diff --git a/properties_pane/view_level/viewLevelConfig.json b/properties_pane/view_level/viewLevelConfig.json index 57278e2..e43c06f 100644 --- a/properties_pane/view_level/viewLevelConfig.json +++ b/properties_pane/view_level/viewLevelConfig.json @@ -1,5 +1,5 @@ /* -* Copyright © 2016-2019 by IntegrIT S.A. dba Hackolade. All rights reserved. +* Copyright © 2016-2024 by IntegrIT S.A. dba Hackolade. All rights reserved. * * The copyright to the computer software herein is the property of IntegrIT S.A. * The software may be used and/or copied only with the written permission of diff --git a/types/numeric.json b/types/number.json similarity index 65% rename from types/numeric.json rename to types/number.json index 0466af7..08742fa 100644 --- a/types/numeric.json +++ b/types/number.json @@ -1,7 +1,8 @@ { - "name": "numeric", + "name": "number", "erdAbbreviation": "", "dtdAbbreviation": "{123}", + "parentType": "numeric", "useSample": true, "defaultValues": { "primaryKey": false, @@ -21,25 +22,5 @@ "divisibleBy": "", "enum": [], "sample": "" - }, - "descriptor": [ - { - "schema": { - "mode": "int32" - }, - "capacity": 4 - }, - { - "schema": { - "mode": "int64" - }, - "capacity": 8 - }, - { - "schema": { - "mode": "double" - }, - "capacity": 8 - } - ] + } }