🐛 fix(driver): 修复驱动代理校验与 DuckDB 表预览超时

- 校验可选 driver-agent revision,避免重装后复用旧代理
- DuckDB 表预览默认不再追加兜底 ORDER BY
- 优化 DuckDB 超时中断提示并补充回归测试
This commit is contained in:
Syngnat
2026-05-06 19:32:55 +08:00
parent 3c68325132
commit da9a76715a
6 changed files with 229 additions and 9 deletions

View File

@@ -0,0 +1,13 @@
import { describe, expect, it } from 'vitest';
import { buildOrderBySQL } from './sql';
describe('buildOrderBySQL', () => {
it('does not add fallback ORDER BY for DuckDB without explicit sort', () => {
expect(buildOrderBySQL('duckdb', [], ['ID'])).toBe('');
});
it('keeps explicit DuckDB sort', () => {
expect(buildOrderBySQL('duckdb', { columnKey: 'ID', order: 'descend' }, ['NAME'])).toBe(' ORDER BY "ID" DESC');
});
});