@nocobase/plugin-ai 2.1.25 → 2.1.27
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/api/app/env.md +2 -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/get-started/installation/env.md +1 -1
- package/dist/client/{646.02b133e5482c37e9.js → 646.07bb23e72fb6eb15.js} +1 -1
- package/dist/client/ai-employees/chatbox/utils.d.ts +1 -0
- package/dist/client/index.js +2 -2
- package/dist/externalVersion.js +16 -16
- 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/package.json +2 -2
- package/dist/ai/docs/nocobase/data-sources/development/index.md +0 -6
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
pkg: "@nocobase/plugin-data-source-manager"
|
|
3
|
+
title: "Main data source - MariaDB"
|
|
4
|
+
description: "Learn the supported version, plugin installation, usage, and field mapping for MariaDB as the NocoBase main database."
|
|
5
|
+
keywords: "main data source,MariaDB,main database,field mapping,NocoBase"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# MariaDB
|
|
9
|
+
|
|
10
|
+
## Introduction
|
|
11
|
+
|
|
12
|
+
MariaDB can be used as the NocoBase main database. It stores NocoBase system-table data and business data in the main data source. Configure it when deploying NocoBase; it cannot be deleted after the application is running.
|
|
13
|
+
|
|
14
|
+
| Setting | Description |
|
|
15
|
+
| --- | --- |
|
|
16
|
+
| Supported version | >= 10.9. |
|
|
17
|
+
| Commercial editions | Community, Standard, Professional, and Enterprise. |
|
|
18
|
+
| Database type | MariaDB. |
|
|
19
|
+
|
|
20
|
+
MariaDB is similar to MySQL and is suitable as the main database for regular business systems.
|
|
21
|
+
|
|
22
|
+
## Plugin installation
|
|
23
|
+
|
|
24
|
+
MariaDB is built in and does not require a separate plugin.
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
1. Select or enter MariaDB connection settings when deploying NocoBase.
|
|
29
|
+
2. After NocoBase starts, open **Data source management**, select **Main**, and manage collections and fields in the main database.
|
|
30
|
+
3. To connect tables that already exist in the database, use **Sync from database** on the main-database management page.
|
|
31
|
+
4. When configuring fields, use [Collections](../data-modeling/collection.md) and [Collection fields](../data-modeling/collection-fields/index.md) to choose Field types and Field interfaces.
|
|
32
|
+
|
|
33
|
+
## Field type mapping
|
|
34
|
+
|
|
35
|
+
When you create a field in NocoBase, NocoBase creates the corresponding MariaDB column. When you synchronize an existing table, NocoBase maps the MariaDB column type to a suitable Field type and Field interface. You can adjust the display interface in field configuration.
|
|
36
|
+
|
|
37
|
+
| MariaDB type | NocoBase Field type | Available Field interfaces |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| `TINYINT`, `SMALLINT`, `MEDIUMINT` | `integer`, `boolean`, `sort` | Integer, Sort, Checkbox, Switch, Select, Radio group. |
|
|
40
|
+
| `INT`, `INTEGER` | `integer`, `unixTimestamp`, `sort` | Integer, Sort, Unix timestamp, Select, Radio group. |
|
|
41
|
+
| `BIGINT` | `bigInt`, `snowflakeId`, `unixTimestamp`, `sort` | Integer, Sort, Unix timestamp, Created at, Updated at. |
|
|
42
|
+
| `FLOAT`, `DOUBLE` | `float` | Number, Percent. |
|
|
43
|
+
| `DECIMAL` | `decimal` | Number, Percent, Currency. |
|
|
44
|
+
| `CHAR`, `VARCHAR` | `string`, `uuid`, `nanoid`, `encryption` | Input, Email, Phone, Password, Color, Icon, Select, Radio group, UUID, Nano ID. |
|
|
45
|
+
| `TINYTEXT`, `TEXT`, `MEDIUMTEXT`, `LONGTEXT` | `text` | Textarea, Markdown, Vditor, Rich text, URL. |
|
|
46
|
+
| `DATE` | `dateOnly` | Date. |
|
|
47
|
+
| `TIME` | `time` | Time. |
|
|
48
|
+
| `DATETIME` | `datetimeNoTz`, `datetimeTz`, `date` | Date, Time, Created at, Updated at. |
|
|
49
|
+
| `TIMESTAMP` | `datetimeTz`, `date` | Date, Time, Created at, Updated at. |
|
|
50
|
+
| `YEAR` | `string`, `integer` | Input, Integer, Date. |
|
|
51
|
+
| `JSON` | `json`, `array` | JSON. |
|
|
52
|
+
|
|
53
|
+
:::warning Note
|
|
54
|
+
|
|
55
|
+
Unsupported MariaDB types are shown separately in field configuration. They require development support before they can be used as normal NocoBase fields.
|
|
56
|
+
|
|
57
|
+
:::
|
|
58
|
+
|
|
59
|
+
For common configuration, see [Main database](./index.md).
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
pkg: "@nocobase/plugin-data-source-manager"
|
|
3
|
+
title: "Main data source - MySQL"
|
|
4
|
+
description: "Learn the supported version, plugin installation, usage, and field mapping for MySQL as the NocoBase main database."
|
|
5
|
+
keywords: "main data source,MySQL,main database,field mapping,NocoBase"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# MySQL
|
|
9
|
+
|
|
10
|
+
## Introduction
|
|
11
|
+
|
|
12
|
+
MySQL can be used as the NocoBase main database. It stores NocoBase system-table data and business data in the main data source. Configure it when deploying NocoBase; it cannot be deleted after the application is running.
|
|
13
|
+
|
|
14
|
+
| Setting | Description |
|
|
15
|
+
| --- | --- |
|
|
16
|
+
| Supported version | >= 8.0.17. |
|
|
17
|
+
| Commercial editions | Community, Standard, Professional, and Enterprise. |
|
|
18
|
+
| Database type | MySQL. |
|
|
19
|
+
|
|
20
|
+
MySQL is suitable as the main database for regular business systems.
|
|
21
|
+
|
|
22
|
+
## Plugin installation
|
|
23
|
+
|
|
24
|
+
MySQL is built in and does not require a separate plugin.
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
1. Select or enter MySQL connection settings when deploying NocoBase.
|
|
29
|
+
2. After NocoBase starts, open **Data source management**, select **Main**, and manage collections and fields in the main database.
|
|
30
|
+
3. To connect tables that already exist in the database, use **Sync from database** on the main-database management page.
|
|
31
|
+
4. When configuring fields, use [Collections](../data-modeling/collection.md) and [Collection fields](../data-modeling/collection-fields/index.md) to choose Field types and Field interfaces.
|
|
32
|
+
|
|
33
|
+
## Field type mapping
|
|
34
|
+
|
|
35
|
+
When you create a field in NocoBase, NocoBase creates the corresponding MySQL column. When you synchronize an existing table, NocoBase maps the MySQL column type to a suitable Field type and Field interface. You can adjust the display interface in field configuration.
|
|
36
|
+
|
|
37
|
+
| MySQL type | NocoBase Field type | Available Field interfaces |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| `TINYINT`, `SMALLINT`, `MEDIUMINT` | `integer`, `boolean`, `sort` | Integer, Sort, Checkbox, Switch, Select, Radio group. |
|
|
40
|
+
| `INT`, `INTEGER` | `integer`, `unixTimestamp`, `sort` | Integer, Sort, Unix timestamp, Select, Radio group. |
|
|
41
|
+
| `BIGINT` | `bigInt`, `snowflakeId`, `unixTimestamp`, `sort` | Integer, Sort, Unix timestamp, Created at, Updated at. |
|
|
42
|
+
| `FLOAT`, `DOUBLE` | `float` | Number, Percent. |
|
|
43
|
+
| `DECIMAL` | `decimal` | Number, Percent, Currency. |
|
|
44
|
+
| `CHAR`, `VARCHAR` | `string`, `uuid`, `nanoid`, `encryption` | Input, Email, Phone, Password, Color, Icon, Select, Radio group, UUID, Nano ID. |
|
|
45
|
+
| `TINYTEXT`, `TEXT`, `MEDIUMTEXT`, `LONGTEXT` | `text` | Textarea, Markdown, Vditor, Rich text, URL. |
|
|
46
|
+
| `DATE` | `dateOnly` | Date. |
|
|
47
|
+
| `TIME` | `time` | Time. |
|
|
48
|
+
| `DATETIME` | `datetimeNoTz`, `datetimeTz`, `date` | Date, Time, Created at, Updated at. |
|
|
49
|
+
| `TIMESTAMP` | `datetimeTz`, `date` | Date, Time, Created at, Updated at. |
|
|
50
|
+
| `YEAR` | `string`, `integer` | Input, Integer, Date. |
|
|
51
|
+
| `JSON` | `json`, `array` | JSON. |
|
|
52
|
+
|
|
53
|
+
:::warning Note
|
|
54
|
+
|
|
55
|
+
Unsupported MySQL types are shown separately in field configuration. They require development support before they can be used as normal NocoBase fields.
|
|
56
|
+
|
|
57
|
+
:::
|
|
58
|
+
|
|
59
|
+
For common configuration, see [Main database](./index.md).
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
pkg: "@nocobase/plugin-data-source-oceanbase"
|
|
3
|
+
title: "Main data source - OceanBase"
|
|
4
|
+
description: "Learn the supported version, plugin installation, usage, and field mapping for OceanBase as the NocoBase main database."
|
|
5
|
+
keywords: "main data source,OceanBase,main database,field mapping,NocoBase"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# OceanBase
|
|
9
|
+
|
|
10
|
+
## Introduction
|
|
11
|
+
|
|
12
|
+
OceanBase can be used as the NocoBase main database. It stores NocoBase system-table data and business data in the main data source. Configure it when deploying NocoBase; it cannot be deleted after the application is running.
|
|
13
|
+
|
|
14
|
+
| Setting | Description |
|
|
15
|
+
| --- | --- |
|
|
16
|
+
| Supported version | >= 4.3. |
|
|
17
|
+
| Commercial editions | Enterprise. |
|
|
18
|
+
| Database type | MySQL compatibility mode. |
|
|
19
|
+
|
|
20
|
+
:::warning Note
|
|
21
|
+
|
|
22
|
+
OceanBase is supported as the main database only in MySQL compatibility mode.
|
|
23
|
+
|
|
24
|
+
:::
|
|
25
|
+
|
|
26
|
+
## Plugin installation
|
|
27
|
+
|
|
28
|
+
OceanBase is provided by `@nocobase/plugin-data-source-oceanbase` and requires a commercial license.
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
1. Select or enter OceanBase connection settings when deploying NocoBase.
|
|
33
|
+
2. After NocoBase starts, open **Data source management**, select **Main**, and manage collections and fields in the main database.
|
|
34
|
+
3. To connect tables that already exist in the database, use **Sync from database** on the main-database management page.
|
|
35
|
+
4. When configuring fields, use [Collections](../data-modeling/collection.md) and [Collection fields](../data-modeling/collection-fields/index.md) to choose Field types and Field interfaces.
|
|
36
|
+
|
|
37
|
+
## Field type mapping
|
|
38
|
+
|
|
39
|
+
When you create a field in NocoBase, NocoBase creates the corresponding OceanBase column. When you synchronize an existing table, NocoBase uses MySQL-compatible mapping to select a suitable Field type and Field interface. You can adjust the display interface in field configuration.
|
|
40
|
+
|
|
41
|
+
| OceanBase type | NocoBase Field type | Available Field interfaces |
|
|
42
|
+
| --- | --- | --- |
|
|
43
|
+
| `TINYINT`, `SMALLINT`, `MEDIUMINT` | `integer`, `boolean`, `sort` | Integer, Sort, Checkbox, Switch, Select, Radio group. |
|
|
44
|
+
| `INT`, `INTEGER` | `integer`, `unixTimestamp`, `sort` | Integer, Sort, Unix timestamp, Select, Radio group. |
|
|
45
|
+
| `BIGINT` | `bigInt`, `snowflakeId`, `unixTimestamp`, `sort` | Integer, Sort, Unix timestamp, Created at, Updated at. |
|
|
46
|
+
| `FLOAT`, `DOUBLE` | `float` | Number, Percent. |
|
|
47
|
+
| `DECIMAL` | `decimal` | Number, Percent, Currency. |
|
|
48
|
+
| `CHAR`, `VARCHAR` | `string`, `uuid`, `nanoid`, `encryption` | Input, Email, Phone, Password, Color, Icon, Select, Radio group, UUID, Nano ID. |
|
|
49
|
+
| `TEXT` | `text` | Textarea, Markdown, Vditor, Rich text, URL. |
|
|
50
|
+
| `DATE` | `dateOnly` | Date. |
|
|
51
|
+
| `TIME` | `time` | Time. |
|
|
52
|
+
| `DATETIME` | `datetimeNoTz`, `datetimeTz`, `date` | Date, Time, Created at, Updated at. |
|
|
53
|
+
| `TIMESTAMP` | `datetimeTz`, `date` | Date, Time, Created at, Updated at. |
|
|
54
|
+
| `JSON` | `json`, `array` | JSON. |
|
|
55
|
+
|
|
56
|
+
:::warning Note
|
|
57
|
+
|
|
58
|
+
Unsupported OceanBase types are shown separately in field configuration. They require development support before they can be used as normal NocoBase fields.
|
|
59
|
+
|
|
60
|
+
:::
|
|
61
|
+
|
|
62
|
+
For common configuration, see [Main database](./index.md).
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
pkg: "@nocobase/plugin-data-source-manager"
|
|
3
|
+
title: "Main data source - PostgreSQL"
|
|
4
|
+
description: "Learn the supported version, plugin installation, usage, and field mapping for PostgreSQL as the NocoBase main database."
|
|
5
|
+
keywords: "main data source,PostgreSQL,main database,field mapping,NocoBase"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# PostgreSQL
|
|
9
|
+
|
|
10
|
+
## Introduction
|
|
11
|
+
|
|
12
|
+
PostgreSQL can be used as the NocoBase main database. It stores NocoBase system-table data and business data in the main data source. Configure the main database when deploying NocoBase; it cannot be deleted after the application is running.
|
|
13
|
+
|
|
14
|
+
| Setting | Description |
|
|
15
|
+
| --- | --- |
|
|
16
|
+
| Supported version | >= 10. |
|
|
17
|
+
| Commercial editions | Community, Standard, Professional, and Enterprise. |
|
|
18
|
+
| Database type | PostgreSQL. |
|
|
19
|
+
|
|
20
|
+
PostgreSQL supports inheritance collections, which are suitable for data models that need inheritance.
|
|
21
|
+
|
|
22
|
+
## Plugin installation
|
|
23
|
+
|
|
24
|
+
PostgreSQL is built in and does not require a separate plugin.
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
1. Select or enter PostgreSQL connection settings when deploying NocoBase.
|
|
29
|
+
2. After NocoBase starts, open **Data source management**, select **Main**, and manage collections and fields in the main database.
|
|
30
|
+
3. To connect tables that already exist in the database, use **Sync from database** on the main-database management page.
|
|
31
|
+
4. When configuring fields, use [Collections](../data-modeling/collection.md) and [Collection fields](../data-modeling/collection-fields/index.md) to choose Field types and Field interfaces.
|
|
32
|
+
|
|
33
|
+
## Field type mapping
|
|
34
|
+
|
|
35
|
+
When you create a field in NocoBase, NocoBase creates the corresponding PostgreSQL column. When you synchronize an existing table, NocoBase maps the PostgreSQL column type to a suitable Field type and Field interface. You can adjust the display interface in field configuration.
|
|
36
|
+
|
|
37
|
+
| PostgreSQL type | NocoBase Field type | Available Field interfaces |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| `BOOLEAN` | `boolean` | Checkbox, Switch. |
|
|
40
|
+
| `SMALLINT`, `INTEGER`, `SERIAL`, `SMALLSERIAL` | `integer`, `boolean`, `sort` | Integer, Sort, Checkbox, Switch, Select, Radio group. |
|
|
41
|
+
| `BIGINT`, `BIGSERIAL` | `bigInt`, `sort` | Integer, Sort, Checkbox, Switch, Select, Radio group, Unix timestamp, Created at, Updated at. |
|
|
42
|
+
| `REAL` | `float` | Number, Percent. |
|
|
43
|
+
| `DOUBLE PRECISION` | `double` | Number, Percent. |
|
|
44
|
+
| `DECIMAL`, `NUMERIC` | `decimal` | Number, Percent, Currency. |
|
|
45
|
+
| `VARCHAR`, `CHAR` | `string`, `password`, `uuid`, `nanoid` | Input, Email, Phone, Password, Color, Icon, Select, Radio group, UUID, Nano ID. |
|
|
46
|
+
| `TEXT` | `text`, `json` | Textarea, Markdown, Vditor, Rich text, URL, JSON. |
|
|
47
|
+
| `UUID` | `uuid` | UUID. |
|
|
48
|
+
| `JSON`, `JSONB` | `json` | JSON. |
|
|
49
|
+
| `TIMESTAMP` | `date` | Date, Time, Created at, Updated at. |
|
|
50
|
+
| `DATE` | `dateOnly` | Date. |
|
|
51
|
+
| `TIME` | `time` | Time. |
|
|
52
|
+
| `POINT`, `LINESTRING`, `POLYGON`, `CIRCLE` | `point`, `lineString`, `polygon`, `circle` | Point, Line string, Polygon, Circle, JSON. |
|
|
53
|
+
| `ARRAY` | `array` | Multiple select, Checkbox group. |
|
|
54
|
+
|
|
55
|
+
:::warning Note
|
|
56
|
+
|
|
57
|
+
Unsupported PostgreSQL types are shown separately in field configuration. They require development support before they can be used as normal NocoBase fields.
|
|
58
|
+
|
|
59
|
+
:::
|
|
60
|
+
|
|
61
|
+
For common configuration, see [Main database](./index.md).
|
|
@@ -359,7 +359,7 @@ SERVER_REQUEST_WHITELIST=api.example.com,*.trusted.com,10.0.0.0/8,127.0.0.1
|
|
|
359
359
|
|
|
360
360
|
**When not set**: All `http` / `https` outbound requests are allowed to keep existing behavior. However, if the target is a loopback, private, link-local, or metadata address, or if a domain resolves to one of these addresses, the server logs a warning.
|
|
361
361
|
|
|
362
|
-
**When set**:
|
|
362
|
+
**When set**: The initial request and every redirect destination must match a whitelist entry; non-matching requests will raise an error before the next request is sent. Future versions may gradually tighten the default behavior. If your deployment needs to access internal services, configure an explicit whitelist in advance.
|
|
363
363
|
|
|
364
364
|
Supported formats:
|
|
365
365
|
|