diff --git a/frontend/src/components/MonacoEditor.tsx b/frontend/src/components/MonacoEditor.tsx index 7701d8a3..09c949ff 100644 --- a/frontend/src/components/MonacoEditor.tsx +++ b/frontend/src/components/MonacoEditor.tsx @@ -126,10 +126,11 @@ const installOceanBaseOracleNavigationFallback = (editor: any) => { } const parts = splitSqlIdentifierPath(identifier.text); - if (parts.length !== 2) { + if (parts.length < 2) { return; } - const [schemaName, tableName] = parts; + const schemaName = parts[parts.length - 2]; + const tableName = parts[parts.length - 1]; if (!schemaName || !tableName) { return; } diff --git a/frontend/src/components/QueryEditorToolbar.i18n.test.ts b/frontend/src/components/QueryEditorToolbar.i18n.test.ts index c3c65b05..24e2926e 100644 --- a/frontend/src/components/QueryEditorToolbar.i18n.test.ts +++ b/frontend/src/components/QueryEditorToolbar.i18n.test.ts @@ -14,6 +14,7 @@ const legacyLiterals = [ '选择连接', '选择数据库', '最大返回行数', + '最大行数:100', '最大行数:500', '最大行数:1000', '最大行数:5000', @@ -64,6 +65,7 @@ describe('QueryEditorToolbar i18n', () => { expect(source).toContain("import { useOptionalI18n } from '../i18n/provider';"); expect(source).toContain('const i18n = useOptionalI18n();'); expect(source).toContain('const t = i18n?.t ?? defaultTranslate;'); + expect(source).toContain("{ label: '100', value: 100 }"); for (const key of requiredKeys) { expect(source).toContain(key); diff --git a/frontend/src/components/QueryEditorToolbar.tsx b/frontend/src/components/QueryEditorToolbar.tsx index 6ea431ff..3d89bb5f 100644 --- a/frontend/src/components/QueryEditorToolbar.tsx +++ b/frontend/src/components/QueryEditorToolbar.tsx @@ -291,6 +291,7 @@ const QueryEditorToolbar: React.FC = ({ value={maxRows} onChange={(val) => onMaxRowsChange(Number(val))} options={[ + { label: '100', value: 100 }, { label: t("query_editor.max_rows.option_500"), value: 500 }, { label: t("query_editor.max_rows.option_1000"), value: 1000 }, { label: t("query_editor.max_rows.option_5000"), value: 5000 },