🐛 fix(frontend): 修复 DuckDB 对象编辑与安全修改回归

- 修复 DuckDB qualified table 在查询结果页丢失 schema 导致无法识别主键的问题

- 打开对象修改前强制刷新最新定义,并避免切换对象失败时沿用旧定义

- 为 DuckDB 元数据链路补充前后端回归测试,并给 app 层真实 runtime 测试增加环境门槛
This commit is contained in:
Syngnat
2026-06-04 22:00:55 +08:00
parent a664f1a869
commit 274c32ebdd
10 changed files with 802 additions and 189 deletions

View File

@@ -48,6 +48,15 @@ describe('extractQueryResultTableRef', () => {
});
});
it('keeps DuckDB schema-qualified table names for metadata lookups', () => {
expect(extractQueryResultTableRef('SELECT * FROM main.events LIMIT 500', 'duckdb', 'main'))
.toEqual({
tableName: 'main.events',
metadataDbName: 'main',
metadataTableName: 'main.events',
});
});
it('does not mark join results as editable table refs', () => {
expect(extractQueryResultTableRef('SELECT * FROM users u JOIN orders o ON u.id = o.user_id', 'oracle', 'APP'))
.toBeUndefined();