feat(data-editor): add MySQL ENUM and SET result editors - #2560
Conversation
1f746d5 to
34ecd67
Compare
…-editor # Conflicts: # chat2db-community-client/package.json
There was a problem hiding this comment.
Reviewed c2716ce.
Findings: 0 critical, 0 high, 1 medium.
Merge recommendation: non-blocking follow-up requested. The SET multi-select editor intercepts Enter without committing, so the documented keyboard completion path does not work.
Coverage limit: read-only review of the current GitHub diff, PR metadata, linked issue, commits, reviews, and line comments. No tests or runtime checks were run.
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
awmgmcpg
To allow these domains, add them to the
network.allowedlist in your workflow frontmatter:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
Generated by AI Pull Request Reviewer for #2560 · 17.9 AIC · ⌖ 2.82 AIC · ⊞ 17.3K
…-editor # Conflicts: # chat2db-community-client/package.json
There was a problem hiding this comment.
Reviewed e0ba947.
Findings: 0 critical, 0 high, 0 medium.
Merge recommendation: no actionable findings. The previously reported SET Enter completion issue is addressed in this head.
Coverage limit: read-only review of the current GitHub diff, PR metadata, existing reviews, and line comments. No tests or runtime checks were run.
``
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
awmgmcpg
To allow these domains, add them to the
network.allowedlist in your workflow frontmatter:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
Generated by AI Pull Request Reviewer for #2560 · 25.5 AIC · ⌖ 2.8 AIC · ⊞ 17.4K
Related issue
Closes #2558
Scope
Current database support: native MySQL only. The SPI and frontend editor intents are extensible, but every other database plugin, including MySQL-compatible dialects, keeps the existing text editor until it is implemented and verified.
Summary
ENUMandSETmembers from table-column metadata already loaded for result editing. This adds no SQL or metadata query.Selectcomponent for both editors: single-select forENUMandmode="multiple"forSET.Extension contract
IDbMetaData.resolveResultSetEditorMetadata(TableColumn)is the single extension point.resolveResultSetEditorType(...)result and returnsList.of()for options, so unsupported databases require no capability flag or branch.ExecuteResultHeaderEnhancercalls the hook once for each matched result column and writes the returnededitorTypeandeditorOptionsdirectly toHeader.MysqlPluginoverrides the hook today. MariaDB, TiDB, OceanBase, Doris, StarRocks, PostgreSQL, ClickHouse, and all other plugins remain on the default implementation.ENUM and SET metadata source
information_schema.COLUMNSwhen loading editable table columns.COLUMN_TYPEhandling stores ENUM/SET type arguments inTableColumn.value; the editor resolver parses that existing value.Affected surfaces
Verification
yarn test:result-set-editor- passed, including mounted Ant Select DOM interactions.yarn lint:eslint- passed after merging the latestmain.git diff --check- passed.Manual test data is available in the local Docker MySQL instance. Browser automation was not used.
Risk and compatibility
Header.editorOptions,SELECT, andMULTI_SELECTeditor intents only; no storage migration.innerHTML.Reviewer map
IDbMetaData.resolveResultSetEditorMetadata.ExecuteResultHeaderEnhancer.enrichEditorMetadata.MysqlPlugin.NativeMysqlMetaData.MysqlMetaData.resolveMysqlResultSetEditorMetadata.resolveResultSetEditor.SelectEditor; SET specializes it throughMultiSelectEditor.Contributor declaration
AI assistance: Substantial AI assistance was used for implementation, tests, and code review.