mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-06-21 05:53:46 +08:00
🐛 fix(duckdb): 修复唯一索引识别与多库对象解析
- 合并 DuckDB 约束与索引元数据,恢复唯一索引表的可编辑判定 - 修复 attach 多库场景下 catalog/schema/table 定位混乱问题 - 统一前后端 qualified name 解析,支持带点和带引号对象名 - 补充 DuckDB 元数据与编辑链路回归测试
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { buildOrderBySQL, buildPaginatedSelectSQL, reverseOrderBySQL } from './sql';
|
||||
import { buildOrderBySQL, buildPaginatedSelectSQL, quoteQualifiedIdent, reverseOrderBySQL } from './sql';
|
||||
|
||||
describe('buildOrderBySQL', () => {
|
||||
it('does not add fallback ORDER BY for DuckDB without explicit sort', () => {
|
||||
@@ -52,3 +52,15 @@ describe('reverseOrderBySQL', () => {
|
||||
.toBe(' ORDER BY COALESCE([a], [b]) DESC, [id] ASC');
|
||||
});
|
||||
});
|
||||
|
||||
describe('quoteQualifiedIdent', () => {
|
||||
it('does not split dots inside quoted DuckDB identifiers', () => {
|
||||
expect(quoteQualifiedIdent('duckdb', '"daily.events"."2026.06"'))
|
||||
.toBe('"daily.events"."2026.06"');
|
||||
});
|
||||
|
||||
it('preserves three-part DuckDB names with quoted dots', () => {
|
||||
expect(quoteQualifiedIdent('duckdb', '"analytics.catalog"."main.schema"."daily.events"'))
|
||||
.toBe('"analytics.catalog"."main.schema"."daily.events"');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user