feat(postgres): support PostgreSQL in odc-client (issue #850)#29
Open
LordofAvernus wants to merge 4 commits into
Open
feat(postgres): support PostgreSQL in odc-client (issue #850)#29LordofAvernus wants to merge 4 commits into
LordofAvernus wants to merge 4 commits into
Conversation
…nfiguration Enable PostgreSQL datasource to have full workbench functionality, aligning with SQLServer configuration: - Enable features: sessionManage, sessionParams, sqlExplain, plRun, groupResourceTree, sqlconsole - Add task types: ASYNC, SQL_PLAN, IMPORT, EXPORT, EXPORT_RESULT_SET, STRUCTURE_COMPARISON, MULTIPLE_ASYNC - Set SQL language to 'pg' for Monaco editor - Add system schemas: information_schema, pg_catalog - Disable enableTableCharsetsAndCollations and enableAutoIncrement (PG uses SERIAL/IDENTITY) - Change date type to 'timestamp' for PG compatibility
…L editing - Create pg-language Monaco plugin directory structure - Implement PostgreSQL keywords list (reserved.ts) - Implement PostgreSQL built-in functions (string, datetime, math, aggregate, window, json, system, array) - Implement Monarch syntax highlighter with PostgreSQL specific features: - Dollar-quoted strings ($$...$$ and $tag$...$tag$) - E-string (E'...') with backslash escapes - Double-quoted identifiers - Nested block comments - Implement simpleParser for SQL context parsing (completion and hover) - Implement autoComplete provider with table/column/schema/function completion - Implement hover provider for DDL display - Implement service layer for data access (getTableList, getTableColumns, getSchemaList, etc.) - Register pg-language plugin in MonacoEditor/index.tsx - Support dynamic loading when language='pg'
- Merge TO_TIMESTAMP function definitions into single polymorphic entry - Remove duplicate CASE keyword in reserved.ts - Remove duplicate FUNCTION/PROCEDURE keywords in trigger section
…kend (issue #850, compat-RISK-3) Refs: #850 Risk: compat-RISK-3 - src/common/datasource/pg/index.tsx: 收敛 PG features.task 至仅含 TaskType.ASYNC(移除 SQL_PLAN / DATA_ARCHIVE / DATA_DELETE / IMPORT / EXPORT / EXPORT_RESULT_SET / STRUCTURE_COMPARISON / MULTIPLE_ASYNC), 与 ODC 后端 PostgreSQLFeatures + odc_version_diff_config 对齐,避免 用户点击后看到 unsupported;其它 features 字段(sessionManage / sessionParams / sqlExplain / plRun / groupResourceTree / sqlconsole / obclient / recycleBin / export)保持原状。 - src/page/Workspace/SideBar/ResourceTree/DatabaseSearchModal/constant.ts: PG 资源搜索对象类型从 [table, column, function, view, trigger] 收敛为 [table, column, function, view],与 ODC 后端 support_trigger=false 一致;MySQL / Oracle / OB-Mysql / DORIS / SQL Server / SEARCH_OBJECT_FROM_ALL_DATABASE 等其它分支保持原状。 - 新增单元测试(map case 形式)覆盖:PG features.task === [ASYNC]、 PG 其它 features 字段不变、PG 资源搜索数组 === [table,column,function,view]、 PG 不再含 trigger / sequence / type / synonym / package 等扩展类型, 以及 MySQL / Oracle / OB-Mysql / DORIS / SQL Server 等横向基线不回归。 落点:design.md §3.5 / §4.2 / §8.1 / §8.2 / §10.3。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ODC 前端 4.3.4 分支接入 PostgreSQL 支持,覆盖 issue #850 的 odc-client 侧改动:
关联 issue: actiontech/dms-ee#850
关联文档: docs/spec/design.md §3.5 / §8.1 / §8.2,docs/dev/compat_risks.md §compat-RISK-3
Test plan