Skip to content

feat(odc-client): ODC workbench DB2 datasource type + table designer (Fixes actiontech/dms-ee#839)#34

Open
actiontech-bot wants to merge 3 commits into
dev-4.3.4from
feat-839
Open

feat(odc-client): ODC workbench DB2 datasource type + table designer (Fixes actiontech/dms-ee#839)#34
actiontech-bot wants to merge 3 commits into
dev-4.3.4from
feat-839

Conversation

@actiontech-bot
Copy link
Copy Markdown
Member

Summary

Front-end work for ODC workbench DB2 LUW support.

  • Add DB2 to ConnectionMode / ConnectType / IDataSourceType; register DB2 in datasource list + icons + label + resource tree.
  • Table designer: set DB2 enableAutoIncrement=false and align tableConfig with DB2 LUW semantics (PK / UK / FK / CHECK constraint rendering, ANSI double-quoted identifier preview).
  • Allow lower-case column names in DB2 table designer (caseSensitivity=true) so the user-typed mixed-case identifier is preserved instead of being upper-cased to align with DB2 ANSI quoting behaviour.

Test plan

  • tsc --noEmit 0 error
  • Browser end-to-end (playwright-cli) verified together with actiontech/odc#feat-839:
    • DB2 datasource appears in 创建数据源 / connection list / resource tree
    • Schema → table / view / index / constraint nodes render
    • 表设计器 column-type dropdown populated; create / update flows produce valid ANSI DDL with double-quoted identifiers

Fixes actiontech/dms-ee#839
Related: actiontech/odc PR #24 (feat-839 → dev/4.3.4), actiontech/dms PR (feat-839)

…/IDataSourceType + datasource registration + icons + label + resource tree)

- d.ts: add ConnectionMode.DB2 + ConnectType.DB2 + IDataSourceType.DB2 (F-01 / F-02 / F-03, literal "DB2" pinned per compat-RISK-2)
- common/datasource/db2: new datasource config patterned after sqlserver, features.sessionManage=true + features.sqlconsole=true (F-04)
- common/datasource/index.tsx: register DB2 + _styles + _gruops (F-05)
- svgr: add db2.svg + database_db2.svg (F-06)
- constant/label: ConnectTypeText[ConnectType.DB2] = 'DB2' hardcoded, no i18n (F-07 per design §3.2 F-S1)
- ResourceTree/DatabaseSearchModal/constant: objectTypeConfig[ConnectType.DB2] = mysqlObjectType (F-08, design §3.4)
- F-09 (isDb2DataSource util) intentionally not added per design §3.5

Refs: actiontech/dms-ee#839
- enableAutoIncrement: true -> false (DB2 uses GENERATED ALWAYS AS IDENTITY
  rather than MySQL AUTO_INCREMENT; the workbench shouldn't surface an
  "自增" checkbox that the backend cannot round-trip).
- sql.caseSensitivity: true -> false (DB2 upper-cases unquoted identifiers
  automatically — same default as Oracle / HANA; expand_odc_db2.md §10.3
  classifies that as caseSensitivity=false).

Issue: dms-ee#839
Fixes Issue dms-ee#839 P0-1: every keystroke in the DB2 table designer's column
name input was being silently upper-cased, making lower-case column names
impossible to enter through the UI.

caseSensitivity is consumed only by CaseInput / CaseTextEditor — when false the
editor's onChangeCaseWrap calls toUpperCase() on any unquoted input. The
previous comment that blamed SQL editor auto-complete was wrong: this flag does
not flow into the SQL editor. Aligning with SQL Server (also double-quoted,
also caseSensitivity=true): the table designer accepts the user's verbatim
input. Users who need to preserve mixed case at the DB layer can still wrap
the identifier in "...", which the editor already supports — DB2's server-side
upper-casing of unquoted identifiers is unchanged.

Related-Issue: actiontech/dms-ee#839
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants