🐛 fix(oceanbase/data-grid): 修复 Oracle 时间字段显示编辑与结果视图异常

- 修复 OceanBase Oracle DATE 与 TIMESTAMP 的解码、展示和编辑精度丢失问题
- 修复查询结果与数据视图的行号显示、分页页数和日期列展示口径
- 打通 Oracle 与 OceanBase 会话执行链路的扫描方言透传
- 补齐 DBQuery、DataGrid temporal 和 OceanBase 结果链路回归测试
This commit is contained in:
Syngnat
2026-06-17 09:49:15 +08:00
parent 6421662f5d
commit 0632c5242c
25 changed files with 2702 additions and 198 deletions

View File

@@ -1,6 +1,6 @@
import { describe, expect, it } from 'vitest';
import { getDataSourceCapabilities } from './dataSourceCapabilities';
import { getDataSourceCapabilities, shouldShowOceanBaseRowNumberColumn } from './dataSourceCapabilities';
describe('dataSourceCapabilities', () => {
it('treats Oracle table preview totals as manual exact count plus approximate metadata count', () => {
@@ -258,6 +258,14 @@ describe('dataSourceCapabilities', () => {
});
});
it('shows row numbers for OceanBase datasources regardless of protocol normalization', () => {
expect(shouldShowOceanBaseRowNumberColumn({ type: 'oceanbase' })).toBe(true);
expect(shouldShowOceanBaseRowNumberColumn({ type: 'oceanbase', oceanBaseProtocol: 'oracle' })).toBe(true);
expect(shouldShowOceanBaseRowNumberColumn({ type: 'custom', driver: 'oceanbase', oceanBaseProtocol: 'oracle' })).toBe(true);
expect(shouldShowOceanBaseRowNumberColumn({ type: 'oracle' })).toBe(false);
expect(shouldShowOceanBaseRowNumberColumn({ type: 'mysql' })).toBe(false);
});
it('treats custom OceanBase Oracle driver as Oracle capabilities', () => {
expect(getDataSourceCapabilities({
type: 'custom',