@nocobase/plugin-ai 2.3.0-alpha.1 → 3.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/docs/nocobase/ai-employees/block/ai-chat-box.md +133 -0
- package/dist/ai/docs/nocobase/ai-employees/knowledge-base/knowledge-base/documents.md +1 -1
- package/dist/ai/docs/nocobase/ai-employees/knowledge-base/knowledge-base/index.md +11 -7
- package/dist/ai/docs/nocobase/ai-employees/knowledge-base/knowledge-base/settings.md +12 -8
- package/dist/ai/docs/nocobase/ai-employees/knowledge-base/vector-database.md +3 -3
- package/dist/ai/docs/nocobase/ai-employees/workflow/nodes/knowledge/create-document.md +1 -1
- package/dist/ai/docs/nocobase/api/app/env.md +3 -1
- package/dist/ai/docs/nocobase/api/cli/index.md +14 -2
- package/dist/ai/docs/nocobase/api/cli/portal/config.md +44 -0
- package/dist/ai/docs/nocobase/api/cli/portal/create.md +48 -0
- package/dist/ai/docs/nocobase/api/cli/portal/deploy.md +39 -0
- package/dist/ai/docs/nocobase/api/cli/portal/destroy.md +41 -0
- package/dist/ai/docs/nocobase/api/cli/portal/dev.md +39 -0
- package/dist/ai/docs/nocobase/api/cli/portal/index.md +136 -0
- package/dist/ai/docs/nocobase/api/cli/portal/info.md +41 -0
- package/dist/ai/docs/nocobase/api/cli/portal/list.md +40 -0
- package/dist/ai/docs/nocobase/api/cli/portal/pull.md +43 -0
- package/dist/ai/docs/nocobase/api/cli/portal/push.md +41 -0
- package/dist/ai/docs/nocobase/building-tips/ai-fill-js-block-form.md +1092 -0
- package/dist/ai/docs/nocobase/data-sources/calendar/calendar-collection.md +100 -3
- package/dist/ai/docs/nocobase/data-sources/collection-comment/index.md +92 -39
- package/dist/ai/docs/nocobase/data-sources/collection-sql/index.md +150 -29
- package/dist/ai/docs/nocobase/data-sources/collection-tree/index.md +93 -5
- package/dist/ai/docs/nocobase/data-sources/collection-view/index.md +226 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/china-region.md +122 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/collection-select.md +105 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/json.md +102 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/nano-id.md +104 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/snowflake-id.md +108 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/sort.md +3 -19
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/uuid.md +104 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/associations/index.md +44 -8
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/color.md +102 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/email.md +104 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/icon.md +102 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/input.md +112 -8
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/integer.md +103 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/number.md +103 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/password.md +102 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/percent.md +104 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/phone.md +104 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/textarea.md +99 -8
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/url.md +103 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/checkbox-group.md +105 -3
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/checkbox.md +102 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/china-region.md +108 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/multiple-select.md +103 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/radio-group.md +106 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/select.md +103 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/date.md +102 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/datetime-without-tz.md +103 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/datetime.md +103 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/index.md +53 -47
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/time.md +102 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/unix-timestamp.md +103 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/geometric/circle.md +102 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/geometric/line.md +103 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/geometric/point.md +102 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/geometric/polygon.md +102 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/index.md +62 -16
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/media/markdown.md +104 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/media/rich-text.md +105 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/created-at.md +105 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/created-by.md +103 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/space.md +100 -6
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/table-oid.md +102 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/updated-at.md +104 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/updated-by.md +104 -6
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/validation.md +68 -58
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection.md +32 -13
- package/dist/ai/docs/nocobase/data-sources/data-modeling/index.md +41 -33
- package/dist/ai/docs/nocobase/data-sources/data-source-external-mariadb/index.md +114 -6
- package/dist/ai/docs/nocobase/data-sources/data-source-external-mssql/index.md +117 -6
- package/dist/ai/docs/nocobase/data-sources/data-source-external-mysql/index.md +103 -6
- package/dist/ai/docs/nocobase/data-sources/data-source-external-nocobase/index.md +75 -73
- package/dist/ai/docs/nocobase/data-sources/data-source-external-oracle/index.md +129 -11
- package/dist/ai/docs/nocobase/data-sources/data-source-external-postgres/index.md +110 -6
- package/dist/ai/docs/nocobase/data-sources/data-source-kingbase/index.md +75 -49
- package/dist/ai/docs/nocobase/data-sources/data-source-main/general-collection.md +116 -15
- package/dist/ai/docs/nocobase/data-sources/data-source-main/index.md +92 -62
- package/dist/ai/docs/nocobase/data-sources/data-source-main/inheritance-collection.md +97 -10
- package/dist/ai/docs/nocobase/data-sources/data-source-manager/external-database.md +97 -58
- package/dist/ai/docs/nocobase/data-sources/data-source-manager/index.md +32 -24
- package/dist/ai/docs/nocobase/data-sources/data-source-rest-api/index.md +115 -153
- package/dist/ai/docs/nocobase/data-sources/external/clickhouse.md +124 -0
- package/dist/ai/docs/nocobase/data-sources/external/doris.md +130 -0
- package/dist/ai/docs/nocobase/data-sources/external/index.md +140 -0
- package/dist/ai/docs/nocobase/data-sources/external/kingbase.md +129 -0
- package/dist/ai/docs/nocobase/data-sources/external/mariadb.md +126 -0
- package/dist/ai/docs/nocobase/data-sources/external/mssql.md +129 -0
- package/dist/ai/docs/nocobase/data-sources/external/mysql.md +115 -0
- package/dist/ai/docs/nocobase/data-sources/external/nocobase.md +159 -0
- package/dist/ai/docs/nocobase/data-sources/external/oceanbase.md +126 -0
- package/dist/ai/docs/nocobase/data-sources/external/oracle.md +158 -0
- package/dist/ai/docs/nocobase/data-sources/external/postgresql.md +122 -0
- package/dist/ai/docs/nocobase/data-sources/external/rest-api.md +245 -0
- package/dist/ai/docs/nocobase/data-sources/field-attachment-url/index.md +100 -12
- package/dist/ai/docs/nocobase/data-sources/field-encryption/index.md +48 -47
- package/dist/ai/docs/nocobase/data-sources/field-formula/index.md +99 -5
- package/dist/ai/docs/nocobase/data-sources/field-markdown-vditor/index.md +105 -5
- package/dist/ai/docs/nocobase/data-sources/field-sequence/index.md +102 -5
- package/dist/ai/docs/nocobase/data-sources/field-signature/index.md +18 -16
- package/dist/ai/docs/nocobase/data-sources/field-sort/index.md +76 -73
- package/dist/ai/docs/nocobase/data-sources/file-manager/field-attachment.md +101 -7
- package/dist/ai/docs/nocobase/data-sources/file-manager/file-collection.md +101 -14
- package/dist/ai/docs/nocobase/data-sources/index.md +49 -33
- package/dist/ai/docs/nocobase/data-sources/main/index.md +130 -0
- package/dist/ai/docs/nocobase/data-sources/main/kingbase.md +147 -0
- package/dist/ai/docs/nocobase/data-sources/main/mariadb.md +59 -0
- package/dist/ai/docs/nocobase/data-sources/main/mysql.md +59 -0
- package/dist/ai/docs/nocobase/data-sources/main/oceanbase.md +62 -0
- package/dist/ai/docs/nocobase/data-sources/main/postgresql.md +61 -0
- package/dist/ai/docs/nocobase/file-manager/storage/index.md +66 -26
- package/dist/ai/docs/nocobase/file-manager/storage/s3-pro.md +58 -7
- package/dist/ai/docs/nocobase/get-started/installation/env.md +2 -2
- package/dist/ai/docs/nocobase/ops-management/migration-manager/built-in-tables.md +1 -2
- package/dist/ai/docs/nocobase/runjs/context/ai.md +194 -4
- package/dist/ai/tools/executeFrontendTool.d.ts +10 -0
- package/dist/ai/tools/executeFrontendTool.js +86 -0
- package/dist/ai/tools/getSkill.js +1 -1
- package/dist/ai/tools/loadFrontendTool.d.ts +10 -0
- package/dist/ai/tools/loadFrontendTool.js +99 -0
- package/dist/client/244.8631eb5cf3f05e21.js +10 -0
- package/dist/client/{525.203778500aca5d05.js → 525.94dd4136c1361477.js} +1 -1
- package/dist/client/681.6ffbc9329b9ac242.js +10 -0
- package/dist/{client-v2/705.1d10027ff8cfdf79.js → client/705.19b642db34de438a.js} +1 -1
- package/dist/client/index.d.ts +1 -3
- package/dist/client/index.js +8 -8
- package/dist/client-v2/244.c428e645ecb94414.js +10 -0
- package/dist/client-v2/420.b2aedb1ff71fca0e.js +10 -0
- package/dist/client-v2/681.6890caa389564ff7.js +10 -0
- package/dist/client-v2/705.8dc34d43f02f322c.js +10 -0
- package/dist/client-v2/ai-employees/AIEmployeeShortcut.d.ts +2 -0
- package/dist/client-v2/ai-employees/AddContextButton.d.ts +2 -0
- package/dist/client-v2/ai-employees/chatbox/components/AIEmployeeSwitcher.d.ts +1 -0
- package/dist/client-v2/ai-employees/chatbox/components/ChatBoxUnreadBadge.d.ts +17 -0
- package/dist/client-v2/ai-employees/chatbox/components/Conversations.d.ts +9 -1
- package/dist/client-v2/ai-employees/chatbox/components/MessageRenderers.d.ts +1 -1
- package/dist/client-v2/ai-employees/chatbox/components/Messages.d.ts +5 -1
- package/dist/client-v2/ai-employees/chatbox/components/ModelSwitcher.d.ts +4 -0
- package/dist/client-v2/ai-employees/chatbox/components/Sender.d.ts +33 -1
- package/dist/client-v2/ai-employees/chatbox/components/index.d.ts +1 -0
- package/dist/client-v2/ai-employees/chatbox/hooks/useChat.d.ts +8 -5
- package/dist/client-v2/ai-employees/chatbox/hooks/useChatBoxActions.d.ts +3 -2
- package/dist/client-v2/ai-employees/chatbox/hooks/useChatBoxEffect.d.ts +2 -1
- package/dist/client-v2/ai-employees/chatbox/hooks/useChatConversationActions.d.ts +3 -2
- package/dist/client-v2/ai-employees/chatbox/hooks/useChatMessageActions.d.ts +4 -2
- package/dist/client-v2/ai-employees/chatbox/hooks/useToolCallActions.d.ts +3 -1
- package/dist/client-v2/ai-employees/chatbox/hooks/useUploadFiles.d.ts +13 -3
- package/dist/client-v2/ai-employees/chatbox/hooks/useWorkflowTasks.d.ts +3 -2
- package/dist/client-v2/ai-employees/chatbox/index.d.ts +17 -0
- package/dist/client-v2/ai-employees/chatbox/roles.d.ts +2 -153
- package/dist/client-v2/ai-employees/chatbox/stores/chat-box.d.ts +46 -31
- package/dist/client-v2/ai-employees/chatbox/stores/chat-conversations.d.ts +7 -7
- package/dist/client-v2/ai-employees/chatbox/stores/chat-messages.d.ts +23 -18
- package/dist/client-v2/ai-employees/chatbox/stores/chat-sender.d.ts +43 -0
- package/dist/client-v2/ai-employees/chatbox/stores/chat-tool-call.d.ts +6 -5
- package/dist/client-v2/ai-employees/chatbox/stores/chat-tools.d.ts +11 -5
- package/dist/client-v2/ai-employees/chatbox/stores/mounted-chat-boxes.d.ts +20 -0
- package/dist/client-v2/ai-employees/chatbox/stores/runtime.d.ts +43 -0
- package/dist/client-v2/ai-employees/chatbox/stores/workflow-tasks.d.ts +22 -10
- package/dist/client-v2/ai-employees/chatbox/upload.d.ts +19 -0
- package/dist/client-v2/ai-employees/chatbox/utils.d.ts +28 -4
- package/dist/client-v2/ai-employees/frontend-tools.d.ts +11 -0
- package/dist/client-v2/ai-employees/tools/SuggestionsOptionsCard.d.ts +1 -1
- package/dist/client-v2/ai-employees/tools/WorkflowTaskOutputCard.d.ts +1 -1
- package/dist/client-v2/ai-employees/types.d.ts +30 -0
- package/dist/client-v2/block/ai-chat-box/AIChatBoxBlockModel.d.ts +21 -0
- package/dist/client-v2/block/ai-chat-box/AIChatBoxCoreModel.d.ts +13 -0
- package/dist/client-v2/block/ai-chat-box/components/AIChatBoxCoreView.d.ts +10 -0
- package/dist/client-v2/block/ai-chat-box/components/AIChatBoxView.d.ts +12 -0
- package/dist/client-v2/block/ai-chat-box/index.d.ts +14 -0
- package/dist/client-v2/block/ai-chat-box/settings.d.ts +12 -0
- package/dist/client-v2/block/ai-chat-box/sub-models.d.ts +26 -0
- package/dist/client-v2/block/ai-chat-box/types.d.ts +38 -0
- package/dist/client-v2/block/ai-chat-box/utils.d.ts +26 -0
- package/dist/client-v2/index.d.ts +3 -5
- package/dist/client-v2/index.js +3 -3
- package/dist/client-v2/llm-services/model-select.d.ts +33 -0
- package/dist/client-v2/llm-services/utils.d.ts +1 -0
- package/dist/client-v2/manager/ai-manager.d.ts +10 -3
- package/dist/client-v2/manager/frontend-tool-registry.d.ts +30 -0
- package/dist/client-v2/models/ai-employees/AIEmployeeActionModel.d.ts +4 -1
- package/dist/client-v2/models/ai-employees/AIEmployeeShortcutModel.d.ts +5 -0
- package/dist/client-v2/pages/EmployeesPage.d.ts +2 -0
- package/dist/client-v2/runjs/registerAIEmployeeRunJSFacade.d.ts +1 -0
- package/dist/common/ai-employee-validation.d.ts +15 -0
- package/dist/common/ai-employee-validation.js +61 -0
- package/dist/common/error-codes.d.ts +13 -0
- package/dist/common/error-codes.js +48 -0
- package/dist/common/frontend-tools.d.ts +26 -0
- package/dist/common/frontend-tools.js +57 -0
- package/dist/common/llm-service-models.d.ts +16 -0
- package/dist/common/llm-service-models.js +84 -0
- package/dist/externalVersion.js +16 -16
- package/dist/locale/en-US.json +67 -0
- package/dist/locale/zh-CN.json +67 -0
- package/dist/node_modules/@langchain/mistralai/package.json +1 -1
- package/dist/node_modules/@langchain/xai/package.json +1 -1
- package/dist/node_modules/fs-extra/package.json +1 -1
- package/dist/node_modules/jsonrepair/package.json +1 -1
- package/dist/node_modules/just-bash/package.json +1 -1
- package/dist/node_modules/nodejs-snowflake/package.json +1 -1
- package/dist/node_modules/openai/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/ai-employees/ai-conversations.d.ts +4 -1
- package/dist/server/ai-employees/ai-conversations.js +2 -0
- package/dist/server/ai-employees/ai-employee.d.ts +2 -1
- package/dist/server/ai-employees/ai-employee.js +26 -7
- package/dist/server/ai-employees/middleware/conversation.js +9 -2
- package/dist/server/collections/ai-conversations.js +5 -0
- package/dist/server/document-loader/constants.js +1 -1
- package/dist/server/frontend-tools.d.ts +25 -0
- package/dist/server/frontend-tools.js +171 -0
- package/dist/server/manager/work-context-handler.js +10 -3
- package/dist/server/plugin.d.ts +1 -0
- package/dist/server/plugin.js +25 -0
- package/dist/server/resource/aiConversations.d.ts +2 -0
- package/dist/server/resource/aiConversations.js +33 -3
- package/dist/server/resource/aiEmployees.d.ts +2 -0
- package/dist/server/resource/aiEmployees.js +62 -0
- package/dist/server/resource/aiWorkflowTasks.js +9 -1
- package/dist/server/resource/llmServices.d.ts +11 -0
- package/dist/server/resource/llmServices.js +85 -0
- package/dist/server/types/knowledge-base.type.d.ts +6 -2
- package/dist/swagger/common.d.ts +143 -0
- package/dist/swagger/common.js +144 -0
- package/dist/swagger/employees.d.ts +301 -0
- package/dist/swagger/employees.js +131 -0
- package/dist/swagger/index.d.ts +1588 -0
- package/dist/swagger/index.js +62 -0
- package/dist/swagger/llm.d.ts +555 -0
- package/dist/swagger/llm.js +247 -0
- package/dist/swagger/schemas.d.ts +736 -0
- package/dist/swagger/schemas.js +381 -0
- package/package.json +2 -2
- package/dist/ai/docs/nocobase/ai-employees/knowledge-base/vector-store.md +0 -24
- package/dist/ai/docs/nocobase/data-sources/development/index.md +0 -6
- package/dist/client/372.40eb52905e3f3049.js +0 -10
- package/dist/client/681.399948c18d753667.js +0 -10
- package/dist/client/705.380279da896021fb.js +0 -10
- package/dist/client-v2/372.8cc3fde09c9bec77.js +0 -10
- package/dist/client-v2/406.341be51205c674e0.js +0 -10
- package/dist/client-v2/681.082f4f1c7b841983.js +0 -10
- package/dist/client-v2/ai-employees/chatbox/stores/create-selectors.d.ts +0 -46
- package/dist/client-v2/ai-employees/chatbox/utils/normalizeTriggerTaskOptions.d.ts +0 -19
|
@@ -1,100 +1,130 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
title: "Main database"
|
|
3
|
+
description: "The NocoBase main database stores system and business data. It supports MySQL, PostgreSQL, MariaDB, KingbaseES, and OceanBase, table synchronization, and collection creation."
|
|
4
|
+
keywords: "main database,MySQL,PostgreSQL,MariaDB,KingbaseES,OceanBase,table synchronization,NocoBase"
|
|
3
5
|
---
|
|
4
6
|
|
|
5
|
-
# Main
|
|
7
|
+
# Main database
|
|
6
8
|
|
|
7
9
|
## Introduction
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
The database configured when [deploying NocoBase](/ai/install-nocobase-app) stores NocoBase system tables and can also store application business tables.
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
| Database | Supported version | Community | Standard | Professional | Enterprise |
|
|
14
|
+
| --- | --- | --- | --- | --- | --- |
|
|
15
|
+
| MySQL | >= 8.0.17 | Yes | Yes | Yes | Yes |
|
|
16
|
+
| PostgreSQL | >= 10 | Yes | Yes | Yes | Yes |
|
|
17
|
+
| MariaDB | >= 10.9 | Yes | Yes | Yes | Yes |
|
|
18
|
+
| KingbaseES | >= V9 | No | No | Yes | Yes |
|
|
19
|
+
| OceanBase | >= 4.3 | No | No | No | Yes |
|
|
12
20
|
|
|
13
|
-
|
|
21
|
+
:::tip Tip
|
|
14
22
|
|
|
15
|
-
|
|
23
|
+
KingbaseES supports only PostgreSQL compatibility mode. OceanBase supports only MySQL compatibility mode.
|
|
16
24
|
|
|
17
|
-
|
|
25
|
+
:::
|
|
18
26
|
|
|
19
|
-
|
|
27
|
+
## Plugin installation
|
|
20
28
|
|
|
21
|
-
|
|
29
|
+
| Database | Plugin | Installation |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| MySQL | None | Built in; no separate installation is required. |
|
|
32
|
+
| PostgreSQL | None | Built in; no separate installation is required. |
|
|
33
|
+
| MariaDB | None | Built in; no separate installation is required. |
|
|
34
|
+
| KingbaseES | `@nocobase/plugin-data-source-kingbase` | Requires a commercial license and is enabled after installation. |
|
|
35
|
+
| OceanBase | `@nocobase/plugin-data-source-oceanbase` | Requires a commercial license and is enabled after installation. |
|
|
22
36
|
|
|
23
|
-
|
|
37
|
+
## Access the main data source
|
|
24
38
|
|
|
25
|
-
|
|
39
|
+
1. Open the **Data sources** menu.
|
|
40
|
+
2. Select **Main** in the data-source list and click **Configure** to manage the main database.
|
|
26
41
|
|
|
27
|
-
|
|
28
|
-
- **Flexible Integration**: Tables created through other tools (such as SQL scripts, database management tools, etc.) can be brought under NocoBase management
|
|
29
|
-
- **Progressive Migration**: Support for gradually migrating existing systems to NocoBase, rather than all-at-once refactoring
|
|
42
|
+

|
|
30
43
|
|
|
31
|
-
|
|
32
|
-
1. Browse all tables in the database
|
|
33
|
-
2. Select the tables you need to sync
|
|
34
|
-
3. Automatically identify table structures and field types
|
|
35
|
-
4. Import them into NocoBase for management with one click
|
|
44
|
+
## Main data-source management
|
|
36
45
|
|
|
37
|
-
|
|
46
|
+
The main database manages collections and fields. You can:
|
|
38
47
|
|
|
39
|
-
|
|
48
|
+
- **Filter**: search collections managed by the NocoBase main database.
|
|
49
|
+
- **Create collection**: add a business collection.
|
|
50
|
+
- **Edit**: change business collection metadata.
|
|
51
|
+
- **Delete**: delete a business collection.
|
|
52
|
+
- **Sync from database**: synchronize the structure of an existing database table.
|
|
53
|
+
- **Configure fields**: create, change, and delete collection fields.
|
|
54
|
+
- **+**: create, edit, and delete collection categories from the collection tabs.
|
|
40
55
|
|
|
41
|
-
|
|
42
|
-
- **General collection**: built-in commonly used system fields
|
|
43
|
-
- **Inheritance collection**: allows creation of a parent table from which child tables can be derived. Child tables inherit the parent table's structure and can define their own columns
|
|
44
|
-
- **Tree collection**: tree-structured table, currently only supports adjacency list design
|
|
45
|
-
- **Calendar collection**: for creating calendar-related event tables
|
|
46
|
-
- **File collection**: for managing file storage
|
|
47
|
-
- **Expression collection**: for dynamic expression scenarios in workflows
|
|
48
|
-
- **SQL Collection**: not an actual database table, but quickly presents SQL queries in a structured manner
|
|
49
|
-
- **Database View collection**: connects to existing database views
|
|
50
|
-
- **FDW collection**: allows the database system to directly access and query data in external data sources, based on FDW technology
|
|
56
|
+

|
|
51
57
|
|
|
52
|
-
###
|
|
58
|
+
### Synchronize existing tables from the database
|
|
53
59
|
|
|
54
|
-

|
|
55
61
|
|
|
56
|
-
|
|
62
|
+
Synchronizing existing database tables lets you manage them in NocoBase without recreating them.
|
|
57
63
|
|
|
58
|
-
|
|
64
|
+
- **Protect existing investment**: use existing business tables directly.
|
|
65
|
+
- **Flexible integration**: bring in tables created by SQL scripts or database-management tools.
|
|
66
|
+
- **Gradual migration**: migrate an existing system to NocoBase step by step rather than refactoring everything at once.
|
|
59
67
|
|
|
60
|
-
|
|
68
|
+
With **Load from database**, you can:
|
|
61
69
|
|
|
62
|
-
|
|
70
|
+
1. Browse all tables in the database.
|
|
71
|
+
2. Select the tables to synchronize.
|
|
72
|
+
3. Identify table structures and field types automatically.
|
|
73
|
+
4. Import them into NocoBase for management.
|
|
63
74
|
|
|
64
|
-
|
|
75
|
+
### Supported collection types
|
|
65
76
|
|
|
66
|
-
|
|
77
|
+

|
|
67
78
|
|
|
68
|
-
|
|
69
|
-
- **Choices**: Single select, Radio group
|
|
70
|
-
- **Media**: Markdown, Markdown(Vditor), Rich Text, Attachment (URL)
|
|
71
|
-
- **Date & Time**: Datetime (with time zone), Datetime (without time zone)
|
|
72
|
-
- **Advanced**: Sequence, Collection selector, Encryption
|
|
79
|
+
NocoBase supports creating and managing these collection types:
|
|
73
80
|
|
|
74
|
-
|
|
75
|
-
- **
|
|
76
|
-
- **
|
|
77
|
-
- **
|
|
81
|
+
- **General collection**: includes commonly used system fields.
|
|
82
|
+
- **Inheritance collection**: derives child collections from a parent collection. Child collections inherit the parent structure and can define their own fields.
|
|
83
|
+
- **Tree collection**: a hierarchical collection that currently supports the adjacency-list design.
|
|
84
|
+
- **Calendar collection**: stores calendar-related event records.
|
|
85
|
+
- **File collection**: manages file storage.
|
|
86
|
+
- **SQL collection**: presents an SQL query result in a structured form; it is not a real database table.
|
|
87
|
+
- **Database view collection**: connects an existing database view.
|
|
78
88
|
|
|
79
|
-
###
|
|
89
|
+
### Collection categories
|
|
80
90
|
|
|
81
|
-
|
|
91
|
+

|
|
82
92
|
|
|
83
|
-
|
|
93
|
+
### Rich field types
|
|
84
94
|
|
|
85
|
-
|
|
95
|
+

|
|
86
96
|
|
|
87
|
-
|
|
88
|
-
2. **Selective Sync**: You can selectively sync the fields you need, rather than all fields
|
|
89
|
-
3. **Automatic Type Recognition**: Automatically identifies database field types and maps them to NocoBase field types
|
|
90
|
-
4. **Maintain Data Integrity**: The sync process does not affect existing data
|
|
97
|
+
#### Flexible field type conversion
|
|
91
98
|
|
|
92
|
-
|
|
99
|
+
NocoBase supports flexible Field interface conversion when the underlying database type is compatible.
|
|
93
100
|
|
|
94
|
-
|
|
95
|
-
- **Team Collaboration**: When other team members or DBAs add fields to the database, they can be synced promptly
|
|
96
|
-
- **Hybrid Management Mode**: Some fields managed through NocoBase, others through traditional methods - flexible combinations
|
|
101
|
+
For example, a database string field can be presented as:
|
|
97
102
|
|
|
98
|
-
|
|
103
|
+
- **Basic types**: Single line text, Multiline text, Phone, Email, URL, Password, Color, or Icon.
|
|
104
|
+
- **Choice types**: Select or Radio group.
|
|
105
|
+
- **Media types**: Markdown, Markdown (Vditor), Rich text, or Attachment URL.
|
|
106
|
+
- **Date and time types**: Date time with timezone or Date time without timezone.
|
|
107
|
+
- **Advanced types**: Sequence, Collection selector, or Encryption.
|
|
99
108
|
|
|
100
|
-
|
|
109
|
+
This conversion does not change the underlying database storage type. It lets you adjust presentation and interaction as business requirements change while preserving existing data.
|
|
110
|
+
|
|
111
|
+
### Field-level synchronization
|
|
112
|
+
|
|
113
|
+
NocoBase can synchronize fields individually as well as synchronize an entire collection.
|
|
114
|
+
|
|
115
|
+

|
|
116
|
+
|
|
117
|
+
#### Field synchronization behavior
|
|
118
|
+
|
|
119
|
+
1. Synchronize newly added fields after the database schema changes.
|
|
120
|
+
2. Select only the fields you need rather than synchronizing every field.
|
|
121
|
+
3. Identify database field types and map them to NocoBase Field types automatically.
|
|
122
|
+
4. Preserve existing data during synchronization.
|
|
123
|
+
|
|
124
|
+
#### Use cases
|
|
125
|
+
|
|
126
|
+
- **Database schema evolution**: synchronize fields added for new business requirements.
|
|
127
|
+
- **Team collaboration**: synchronize fields added by another team member or DBA.
|
|
128
|
+
- **Hybrid management**: combine fields managed in NocoBase with fields managed by traditional database tools.
|
|
129
|
+
|
|
130
|
+
See [Collection fields](../data-modeling/collection-fields/index.md) for details.
|
|
@@ -1,22 +1,109 @@
|
|
|
1
1
|
---
|
|
2
2
|
pkg: "@nocobase/plugin-data-source-main"
|
|
3
|
+
title: "Inheritance collection"
|
|
4
|
+
description: "Create child collections from a parent collection. Child collections inherit parent fields and can define their own fields; this is supported only by a PostgreSQL main database."
|
|
5
|
+
keywords: "Inheritance collection,table inheritance,PostgreSQL,NocoBase"
|
|
3
6
|
---
|
|
4
7
|
|
|
5
|
-
# Inheritance
|
|
8
|
+
# Inheritance collection
|
|
6
9
|
|
|
7
10
|
## Introduction
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
An **Inheritance collection** extends a general collection. Use it when several collections share stable common fields while each child collection also needs its own fields.
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
For example, create an **Assets** parent collection with asset number, asset name, purchase date, and owner. Then derive **Computer assets**, **Vehicle assets**, and **Office furniture** child collections. Each child inherits the parent fields and can add its own fields.
|
|
12
15
|
|
|
13
|
-
|
|
14
|
-
- Child Collection: The child collection inherits the structure of the parent collection, but can also define its own columns. This allows each child collection to have the common properties of the parent collection while containing attributes specific to the subclass.
|
|
15
|
-
- Querying: When querying, you can choose to query the entire inheritance hierarchy, just the parent collection, or a specific child collection. This allows different levels of data to be retrieved and processed as needed.
|
|
16
|
-
- Inheritance Relationship: An inheritance relationship is established between the parent collection and the child collection, meaning that the structure of the parent collection can be used to define consistent attributes, while allowing the child collection to extend or override these attributes.
|
|
16
|
+
:::warning Note
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Inheritance collections can be created only when the main database is PostgreSQL. Other main databases, external databases, REST API data sources, and external NocoBase data sources do not support them.
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
:::
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
## Use cases
|
|
23
|
+
|
|
24
|
+
- Derive Computer assets, Vehicle assets, and Office furniture from an Assets parent collection.
|
|
25
|
+
- Derive Employees, Contractors, and Visitors from a People parent collection.
|
|
26
|
+
- Derive Tasks, Defects, and Requirements from an Items parent collection.
|
|
27
|
+
- Derive Purchase, Sales, and Service contracts from a Contracts parent collection.
|
|
28
|
+
|
|
29
|
+
Use inheritance when the objects have stable shared fields and differ mainly in a small set of dedicated fields.
|
|
30
|
+
|
|
31
|
+
## Create and configure
|
|
32
|
+
|
|
33
|
+
In the main data source, click **Create collection** and choose a general-collection or inheritance-enabled entry. Select the parent collection in `Inherits`.
|
|
34
|
+
|
|
35
|
+

|
|
36
|
+
|
|
37
|
+
| Setting | Description |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| Collection display name | The name displayed in the interface, such as Computer assets, Vehicle assets, or Office furniture. |
|
|
40
|
+
| Collection name | The internal identifier used by APIs, relation fields, permissions, and workflows. |
|
|
41
|
+
| Inherits | The parent collection. The child inherits its field structure and can define additional fields. |
|
|
42
|
+
| Categories | Organizes collections in the management interface without changing their schema. |
|
|
43
|
+
| Description | Document what the child collection stores, which parent it derives from, and who maintains it. |
|
|
44
|
+
| Preset fields | Usually keeps ID, created-at, created-by, updated-at, and updated-by fields. |
|
|
45
|
+
|
|
46
|
+
Inheritance collections use the same blocks and field configuration as [General collections](./general-collection.md). In page blocks, they are normal collections that support record creation, reading, updating, and deletion.
|
|
47
|
+
|
|
48
|
+
:::warning Note
|
|
49
|
+
|
|
50
|
+
Use inheritance only for highly similar business objects. If objects have substantially different workflows, permissions, and pages, separate general collections connected by relation fields are usually clearer.
|
|
51
|
+
|
|
52
|
+
:::
|
|
53
|
+
|
|
54
|
+
### Built-in fields
|
|
55
|
+
|
|
56
|
+
An inheritance collection inherits fields from its parent and can add fields of its own.
|
|
57
|
+
|
|
58
|
+
| Field source | Description |
|
|
59
|
+
| --- | --- |
|
|
60
|
+
| Parent fields | Shared fields inherited by the child, such as asset number, asset name, and owner. |
|
|
61
|
+
| Child fields | Dedicated child fields, such as CPU model for a computer asset or license plate for a vehicle asset. |
|
|
62
|
+
| System fields | When `Preset fields` are retained, ID, created-at, created-by, updated-at, and updated-by fields are included. |
|
|
63
|
+
|
|
64
|
+
:::warning Note
|
|
65
|
+
|
|
66
|
+
Parent fields affect every child that inherits them. Before changing a parent field, check whether child pages, permissions, workflows, and APIs depend on it.
|
|
67
|
+
|
|
68
|
+
:::
|
|
69
|
+
|
|
70
|
+
### Primary key field
|
|
71
|
+
|
|
72
|
+
Inheritance collections require a primary key just as general collections do. Keep the ID preset field when creating the collection; its default primary-key interface is `Snowflake ID (53-bit)`.
|
|
73
|
+
|
|
74
|
+
If an imported or synchronized inheritance collection has no primary key, set a **Record unique key** when editing the collection. Otherwise page blocks might not view or edit records correctly.
|
|
75
|
+
|
|
76
|
+
## Use in pages
|
|
77
|
+
|
|
78
|
+
Inheritance collections can use most blocks supported by general collections. A common approach is to configure each child collection as its own table, form, details, or Kanban block.
|
|
79
|
+
|
|
80
|
+
| Block | Use |
|
|
81
|
+
| --- | --- |
|
|
82
|
+
| [Table](../../interface-builder/blocks/data-blocks/table.md) | View, filter, sort, and batch-process child records. |
|
|
83
|
+
| [Form](../../interface-builder/blocks/data-blocks/form.md) | Create or edit one child record. |
|
|
84
|
+
| [Details](../../interface-builder/blocks/data-blocks/details.md) | View one child record in detail. |
|
|
85
|
+
| [Kanban](../../interface-builder/blocks/data-blocks/kanban.md) | Group child records by status, stage, owner, or another field. |
|
|
86
|
+
|
|
87
|
+
## Edit configuration
|
|
88
|
+
|
|
89
|
+
Click **Edit** beside an inheritance collection to change its display name, category, description, simple-pagination mode, and Record unique key.
|
|
90
|
+
|
|
91
|
+
Do not change inheritance relationships frequently after business configuration is in use. Page blocks, relation fields, permissions, and workflows can depend on the current field structure.
|
|
92
|
+
|
|
93
|
+
## Delete a collection
|
|
94
|
+
|
|
95
|
+
Click **Delete** beside an inheritance collection to delete it.
|
|
96
|
+
|
|
97
|
+
Deleting an inheritance collection removes the child collection metadata and the real child table in the main database. Before deleting it, confirm that no page blocks, relation fields, permissions, workflows, or APIs still use the child collection.
|
|
98
|
+
|
|
99
|
+
:::danger Warning
|
|
100
|
+
|
|
101
|
+
Deleting a child collection does not automatically mean deleting its parent. Whether dependent objects are deleted depends on the option in the confirmation dialog. Confirm that the parent and other child collections should remain before continuing.
|
|
102
|
+
|
|
103
|
+
:::
|
|
104
|
+
|
|
105
|
+
## Related links
|
|
106
|
+
|
|
107
|
+
- [General collection](./general-collection.md) - General collection configuration.
|
|
108
|
+
- [Main database](./index.md) - Supported main database types.
|
|
109
|
+
- [Collection fields](../data-modeling/collection-fields/index.md) - Field configuration.
|
|
@@ -1,101 +1,140 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
title: "External databases"
|
|
3
|
+
description: "Connect existing MySQL, PostgreSQL, MariaDB, KingbaseES, OceanBase, MSSQL, Oracle, ClickHouse, and Doris databases to NocoBase, then map their fields and relations."
|
|
4
|
+
keywords: "external database,MySQL,PostgreSQL,MariaDB,KingbaseES,OceanBase,MSSQL,Oracle,ClickHouse,Doris,field mapping,NocoBase"
|
|
5
|
+
---
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
# External databases
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
## Introduction
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
An **external database** connects an existing business database to NocoBase. NocoBase reads tables, fields, and views so they can be used in page blocks, permissions, workflows, and APIs.
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
Unlike the [main database](../data-source-main/index.md), the original system and database tools maintain the external schema. NocoBase reads the structure and views; it does not change real tables in the external database.
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
| Database | Supported version | Community | Standard | Professional | Enterprise |
|
|
16
|
+
| --- | --- | --- | --- | --- | --- |
|
|
17
|
+
| MySQL | >= 5.7 | No | Yes | Yes | Yes |
|
|
18
|
+
| PostgreSQL | >= 9.5 | No | Yes | Yes | Yes |
|
|
19
|
+
| MariaDB | >= 10.3 | No | Yes | Yes | Yes |
|
|
20
|
+
| MSSQL | 2014-2019 | No | Yes | Yes | Yes |
|
|
21
|
+
| KingbaseES | >= V9 | No | No | Yes | Yes |
|
|
22
|
+
| OceanBase | >= 4.3 | No | No | No | Yes |
|
|
23
|
+
| Oracle | >= 11g | No | No | No | Yes |
|
|
24
|
+
| ClickHouse | >= 20.2 | No | No | No | Yes |
|
|
25
|
+
| Doris | >= 2.1.0 | No | No | No | Yes |
|
|
12
26
|
|
|
27
|
+
:::tip Tip
|
|
13
28
|
|
|
14
|
-
|
|
29
|
+
KingbaseES supports only PostgreSQL compatibility mode. OceanBase, ClickHouse, and Doris support only MySQL compatibility mode.
|
|
15
30
|
|
|
31
|
+
:::
|
|
16
32
|
|
|
17
|
-
|
|
33
|
+
Typical use cases include:
|
|
18
34
|
|
|
35
|
+
- Connect an existing ERP, MES, WMS, or CRM database and build management pages, permissions, workflows, and reports without changing its schema.
|
|
36
|
+
- Add lightweight approval, data-correction, exception-handling, or operations-dashboard capabilities without replacing the original system.
|
|
37
|
+
- Query, analyze, or display existing data for reporting or BI.
|
|
38
|
+
- Migrate a historical system gradually: keep the old database connected first, then put new business data in the main database over time.
|
|
39
|
+
- Leave the database structure to DBAs, migration scripts, or the original system while NocoBase provides pages and data usage.
|
|
19
40
|
|
|
20
|
-
|
|
41
|
+
:::warning Note
|
|
21
42
|
|
|
43
|
+
An external database is not the NocoBase system database. NocoBase does not manage its backup, restore, migrations, or schema changes.
|
|
22
44
|
|
|
23
|
-
|
|
45
|
+
:::
|
|
24
46
|
|
|
25
|
-
|
|
47
|
+
## Plugin installation
|
|
26
48
|
|
|
49
|
+
Each external database is supplied by a data-source plugin. Install and enable the plugin before its database type appears in **Data source management** > **Add new**.
|
|
27
50
|
|
|
28
|
-
|
|
51
|
+
| Database | Plugin | Installation |
|
|
52
|
+
| --- | --- | --- |
|
|
53
|
+
| MySQL | `@nocobase/plugin-data-source-external-mysql` | Requires a commercial license; install and enable it. |
|
|
54
|
+
| PostgreSQL | `@nocobase/plugin-data-source-external-postgres` | Requires a commercial license; install and enable it. |
|
|
55
|
+
| MariaDB | `@nocobase/plugin-data-source-external-mariadb` | Requires a commercial license; install and enable it. |
|
|
56
|
+
| KingbaseES | `@nocobase/plugin-data-source-kingbase` | Requires a commercial license; install and enable it. |
|
|
57
|
+
| OceanBase | `@nocobase/plugin-data-source-oceanbase` | Requires a commercial license; install and enable it. |
|
|
58
|
+
| MSSQL | `@nocobase/plugin-data-source-external-mssql` | Requires a commercial license; install and enable it. |
|
|
59
|
+
| Oracle | `@nocobase/plugin-data-source-external-oracle` | Requires a commercial license; install and enable it. |
|
|
60
|
+
| ClickHouse | `@nocobase/plugin-data-source-external-clickhouse` | Requires a commercial license; install and enable it. |
|
|
61
|
+
| Doris | `@nocobase/plugin-data-source-external-doris` | Requires a commercial license; install and enable it. |
|
|
29
62
|
|
|
63
|
+

|
|
30
64
|
|
|
31
|
-
|
|
65
|
+
If a database type is missing from **Add new**, check that its plugin is installed and enabled, the commercial license includes it, and the current user can manage data sources.
|
|
32
66
|
|
|
33
|
-
|
|
67
|
+
## Usage
|
|
34
68
|
|
|
69
|
+
### Add an external database
|
|
35
70
|
|
|
36
|
-
|
|
71
|
+
After the plugin is activated, choose the database type from **Add new** and provide its connection information.
|
|
37
72
|
|
|
73
|
+

|
|
38
74
|
|
|
39
|
-
|
|
75
|
+

|
|
40
76
|
|
|
77
|
+
### Synchronize collections
|
|
41
78
|
|
|
42
|
-
|
|
79
|
+
After an external database is connected, NocoBase reads its collections. It cannot create collections or change the external schema. Make schema changes through database tools, then use the refresh action to synchronize metadata.
|
|
43
80
|
|
|
81
|
+

|
|
44
82
|
|
|
45
|
-
|
|
83
|
+
### Configure fields
|
|
46
84
|
|
|
47
|
-
|
|
85
|
+
NocoBase reads and displays existing fields. You can configure their title, **Field type**, and **Field interface**, or use **Edit** for additional configuration.
|
|
48
86
|
|
|
49
|
-
|
|
87
|
+

|
|
50
88
|
|
|
51
|
-
|
|
52
|
-
- UI type (Field interface): Refers to the type of control used in the user interface to display and input field values.
|
|
89
|
+
Because an external database schema cannot be changed from NocoBase, the only field type you can add is a relation field. A relation field is not a real database column; it connects collections in NocoBase.
|
|
53
90
|
|
|
54
|
-
|
|
55
|
-
| - | - | - | - |
|
|
56
|
-
| BOOLEAN | BOOLEAN<br/>TINYINT(1) | boolean | checkbox <br/> switch |
|
|
57
|
-
| SMALLINT<br/>INTEGER<br/>SERIAL<br/>SMALLSERIAL | TINYINT<br/>SMALLINT<br/>MEDIUMINT<br/>INTEGER | integer<br/>boolean<br/>sort | integer<br/>sort<br/>checkbox<br/>switch<br/>select<br/>radioGroup |
|
|
58
|
-
| BIGINT<br/>BIGSERIAL | BIGINT | bigInt<br/>sort | integer<br/>sort<br/>checkbox<br/>switch<br/>select<br/>radioGroup<br/>unixTimestamp<br/>createdAt<br/>updatedAt |
|
|
59
|
-
| REAL | FLOAT | float | number<br/>percent |
|
|
60
|
-
| DOUBLE PRECISION | DOUBLE PRECISION | double | number<br/>percent |
|
|
61
|
-
| DECIMAL<br/>NUMERIC | DECIMAL | decimal | number<br/>percent<br/>currency |
|
|
62
|
-
| VARCHAR<br/>CHAR | VARCHAR<br/>CHAR | string<br/>password<br/>uuid<br/>nanoid | input<br/>email<br/>phone<br/>password<br/>color<br/>icon<br/>select<br/>radioGroup<br/>uuid<br/>nanoid |
|
|
63
|
-
| TEXT | TEXT<br/>TINYTEXT<br/>MEDIUMTEXT<br/>LONGTEXT | text<br/>json | textarea<br/>markdown<br/>vditor<br/>richText<br/>url<br/>json |
|
|
64
|
-
| UUID | - | uuid | uuid |
|
|
65
|
-
| JSON<br/>JSONB | JSON | json | json |
|
|
66
|
-
| TIMESTAMP | DATETIME<br/>TIMESTAMP | date | date<br/>time<br/>createdAt<br/>updatedAt |
|
|
67
|
-
| DATE | DATE | dateOnly | datetime |
|
|
68
|
-
| TIME | TIME | time | time |
|
|
69
|
-
| - | YEAR | | datetime |
|
|
70
|
-
| CIRCLE | | circle | json<br/>circle |
|
|
71
|
-
| PATH<br/>GEOMETRY(LINESTRING) | LINESTRING | lineString | Json<br/>lineString |
|
|
72
|
-
| POINT<br/>GEOMETRY(POINT) | POINT | point | json<br/>point |
|
|
73
|
-
| POLYGON<br/>GEOMETRY(POLYGON) | POLYGON | polygon | json<br/>polygon |
|
|
74
|
-
| GEOMETRY | GEOMETRY | - | - |
|
|
75
|
-
| BLOB | BLOB | blob | - |
|
|
76
|
-
| ENUM | ENUM | enum | select<br/>radioGroup |
|
|
77
|
-
| ARRAY | - | array | multipleSelect<br/>checkboxGroup |
|
|
78
|
-
| BIT | BIT | - | - |
|
|
79
|
-
| SET | SET | set | multipleSelect<br/>checkboxGroup |
|
|
80
|
-
| RANGE | - | - | - |
|
|
91
|
+

|
|
81
92
|
|
|
82
|
-
|
|
93
|
+
See [Collection fields](../data-modeling/collection-fields/index.md) for details.
|
|
83
94
|
|
|
84
|
-
|
|
95
|
+
### Field type mapping
|
|
85
96
|
|
|
97
|
+
NocoBase maps external database types to a corresponding **Field type** and **Field interface**. Field type defines the kind, format, and structure of stored data; Field interface defines the control used to display and enter the value.
|
|
86
98
|
|
|
87
|
-
|
|
88
|
-
|
|
99
|
+
| PostgreSQL | MySQL / MariaDB | NocoBase Field type | NocoBase Field interface |
|
|
100
|
+
| --- | --- | --- | --- |
|
|
101
|
+
| BOOLEAN | BOOLEAN, TINYINT(1) | `boolean` | `checkbox`, `switch` |
|
|
102
|
+
| SMALLINT, INTEGER, SERIAL, SMALLSERIAL | TINYINT, SMALLINT, MEDIUMINT, INTEGER | `integer`, `boolean`, `sort` | `integer`, `sort`, `checkbox`, `switch`, `select`, `radioGroup` |
|
|
103
|
+
| BIGINT, BIGSERIAL | BIGINT | `bigInt`, `sort` | `integer`, `sort`, `checkbox`, `switch`, `select`, `radioGroup`, `unixTimestamp`, `createdAt`, `updatedAt` |
|
|
104
|
+
| REAL | FLOAT | `float` | `number`, `percent` |
|
|
105
|
+
| DOUBLE PRECISION | DOUBLE PRECISION | `double` | `number`, `percent` |
|
|
106
|
+
| DECIMAL, NUMERIC | DECIMAL | `decimal` | `number`, `percent`, `currency` |
|
|
107
|
+
| VARCHAR, CHAR | VARCHAR, CHAR | `string`, `password`, `uuid`, `nanoid` | `input`, `email`, `phone`, `password`, `color`, `icon`, `select`, `radioGroup`, `uuid`, `nanoid` |
|
|
108
|
+
| TEXT | TEXT, TINYTEXT, MEDIUMTEXT, LONGTEXT | `text`, `json` | `textarea`, `markdown`, `vditor`, `richText`, `url`, `json` |
|
|
109
|
+
| UUID | - | `uuid` | `uuid` |
|
|
110
|
+
| JSON, JSONB | JSON | `json` | `json` |
|
|
111
|
+
| TIMESTAMP | DATETIME, TIMESTAMP | `date` | `date`, `time`, `createdAt`, `updatedAt` |
|
|
112
|
+
| DATE | DATE | `dateOnly` | `datetime` |
|
|
113
|
+
| TIME | TIME | `time` | `time` |
|
|
114
|
+
| - | YEAR | - | `datetime` |
|
|
115
|
+
| CIRCLE | - | `circle` | `json`, `circle` |
|
|
116
|
+
| POINT, GEOMETRY(POINT) | POINT | `point` | `json`, `point` |
|
|
117
|
+
| PATH, GEOMETRY(LINESTRING) | LINESTRING | `lineString` | `json`, `lineString` |
|
|
118
|
+
| POLYGON, GEOMETRY(POLYGON) | POLYGON | `polygon` | `json`, `polygon` |
|
|
119
|
+
| GEOMETRY | GEOMETRY | - | - |
|
|
120
|
+
| BLOB | BLOB | `blob` | - |
|
|
121
|
+
| ARRAY | - | `array` | `multipleSelect`, `checkboxGroup` |
|
|
122
|
+
| BIT | BIT | - | - |
|
|
123
|
+
| SET | SET | `set` | `multipleSelect`, `checkboxGroup` |
|
|
124
|
+
| RANGE | - | - | - |
|
|
89
125
|
|
|
90
|
-
###
|
|
126
|
+
### Unsupported field types
|
|
91
127
|
|
|
92
|
-
|
|
128
|
+
Unsupported field types are shown separately. They require development support before they can be used.
|
|
93
129
|
|
|
130
|
+

|
|
94
131
|
|
|
95
|
-
|
|
132
|
+
### Record unique key
|
|
96
133
|
|
|
134
|
+
A collection shown in a block needs a **Record unique key** to locate a record, usually a primary key or unique field.
|
|
97
135
|
|
|
98
|
-
|
|
136
|
+
For a view, table without a primary key, or composite-primary-key table, set the Record unique key manually in the collection configuration. Without a usable unique key, blocks might not be created correctly or might not be able to view and edit records.
|
|
99
137
|
|
|
138
|
+

|
|
100
139
|
|
|
101
|
-

|
|
@@ -1,47 +1,55 @@
|
|
|
1
1
|
---
|
|
2
2
|
pkg: "@nocobase/plugin-data-source-manager"
|
|
3
|
+
title: "Data source management"
|
|
4
|
+
description: "Use the Data Source Manager to manage the main database, external databases, REST API data sources, and external NocoBase data sources from one interface."
|
|
5
|
+
keywords: "data source management,main database,external database,table synchronization,REST API data source,NocoBase"
|
|
3
6
|
---
|
|
4
7
|
|
|
5
|
-
# Data
|
|
8
|
+
# Data source management
|
|
6
9
|
|
|
7
10
|
## Introduction
|
|
8
11
|
|
|
9
|
-
NocoBase provides
|
|
12
|
+
NocoBase provides the **Data Source Manager** plugin to manage data sources and their collections. It provides the management interface for all data sources; it does not connect to a data source by itself. Use it together with the applicable data-source plugin.
|
|
10
13
|
|
|
11
|
-
|
|
12
|
-
- [External MySQL](/data-sources/data-source-external-mysql): Use an external MySQL database as a data source.
|
|
13
|
-
- [External MariaDB](/data-sources/data-source-external-mariadb): Use an external MariaDB database as a data source.
|
|
14
|
-
- [External PostgreSQL](/data-sources/data-source-external-postgres): Use an external PostgreSQL database as a data source.
|
|
15
|
-
- [External MSSQL](/data-sources/data-source-external-mssql): Use an external MSSQL (SQL Server) database as a data source.
|
|
16
|
-
- [External Oracle](/data-sources/data-source-external-oracle): Use an external Oracle database as a data source.
|
|
17
|
-
- [External NocoBase](/data-sources/data-source-external-nocobase/): Use another NocoBase application as an external data source through the remote NocoBase API.
|
|
14
|
+
Supported data sources include:
|
|
18
15
|
|
|
19
|
-
|
|
16
|
+
- [Main database](../data-source-main/index.md): The NocoBase main database. It supports MySQL, PostgreSQL, MariaDB, KingbaseES, and OceanBase.
|
|
17
|
+
- [External PostgreSQL](../data-source-external-postgres/index.md): Uses an external PostgreSQL database as a data source.
|
|
18
|
+
- [External MySQL](../data-source-external-mysql/index.md): Uses an external MySQL database as a data source.
|
|
19
|
+
- [External MariaDB](../data-source-external-mariadb/index.md): Uses an external MariaDB database as a data source.
|
|
20
|
+
- [External MSSQL](../data-source-external-mssql/index.md): Uses an external MSSQL (SQL Server) database as a data source.
|
|
21
|
+
- [External KingbaseES](../data-source-kingbase/index.md): Uses an external KingbaseES database as a data source.
|
|
22
|
+
- [External OceanBase](../external/oceanbase.md): Uses an external OceanBase database as a data source.
|
|
23
|
+
- [External Oracle](../data-source-external-oracle/index.md): Uses an external Oracle database as a data source.
|
|
24
|
+
- [External ClickHouse](../external/clickhouse.md): Uses an external ClickHouse database, typically for queries, statistics, and reports.
|
|
25
|
+
- [External Doris](../external/doris.md): Uses an external Doris database, typically for queries, statistics, and reports.
|
|
26
|
+
- [REST API data source](../data-source-rest-api/index.md): Connects data supplied by a REST API to NocoBase.
|
|
27
|
+
- [External NocoBase](../data-source-external-nocobase/index.md): Uses the remote NocoBase API to connect another NocoBase application as an external data source.
|
|
20
28
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Built-in plugin, no separate installation required.
|
|
29
|
+
Plugins can extend this list with other database types and platforms that provide APIs or SDKs.
|
|
24
30
|
|
|
25
|
-
##
|
|
26
|
-
|
|
27
|
-
When the application is initialized and installed, a data source is provided by default to store NocoBase data, known as the main database. For more information, see the [Main Database](/data-sources/data-source-main/index.md) documentation.
|
|
31
|
+
## Installation
|
|
28
32
|
|
|
29
|
-
|
|
33
|
+
This plugin is built in and does not require a separate installation.
|
|
30
34
|
|
|
31
|
-
|
|
35
|
+
## Usage
|
|
32
36
|
|
|
37
|
+
During application initialization, NocoBase provides a data source for storing NocoBase data. This source is called the **main database**. See [Main database](../data-source-main/index.md) for details.
|
|
33
38
|
|
|
34
|
-
|
|
39
|
+
### External data sources
|
|
35
40
|
|
|
41
|
+
NocoBase supports external databases as data sources. See [External databases](./external-database.md) for details.
|
|
36
42
|
|
|
37
|
-
|
|
43
|
+

|
|
38
44
|
|
|
45
|
+
### Synchronize custom database tables
|
|
39
46
|
|
|
40
|
-
|
|
47
|
+
You can synchronize tables that were created in the database outside NocoBase.
|
|
41
48
|
|
|
49
|
+

|
|
42
50
|
|
|
43
|
-
You can also
|
|
51
|
+
You can also connect data supplied by an HTTP API. See [REST API data source](../data-source-rest-api/index.md) for details.
|
|
44
52
|
|
|
45
|
-
### External NocoBase
|
|
53
|
+
### External NocoBase data source
|
|
46
54
|
|
|
47
|
-
|
|
55
|
+
Use the remote NocoBase API to connect another NocoBase application as an external data source. See [External NocoBase](../data-source-external-nocobase/index.md) for details.
|