mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-07-06 18:41:42 +08:00
✨ feat(editor): 完善 SQL 编辑与数据编辑交互
- 结果区状态按 SQL Tab 独立保存,快捷键可恢复手动隐藏面板 - 对象设计保留完整字段类型和可空信息,完善兼容驱动 DDL 元数据 - 数据编辑新增手动/自动提交设置和自动提交倒计时 - 修复 schema 视图定位时找不到左侧树节点的问题
This commit is contained in:
@@ -60,6 +60,28 @@ export const normalizeSidebarViewName = (dialect: string, dbName: string, schema
|
||||
return `${normalizedSchemaName}.${normalizedViewName}`;
|
||||
};
|
||||
|
||||
export interface SidebarViewMetadataEntry {
|
||||
viewName: string;
|
||||
schemaName: string;
|
||||
}
|
||||
|
||||
export const normalizeSidebarViewMetadataEntry = (
|
||||
dialect: string,
|
||||
dbName: string,
|
||||
schemaName: string,
|
||||
viewName: string,
|
||||
): SidebarViewMetadataEntry | null => {
|
||||
const normalizedViewName = normalizeSidebarViewName(dialect, dbName, schemaName, viewName);
|
||||
if (!normalizedViewName) return null;
|
||||
|
||||
const parsedViewName = splitQualifiedNameLast(viewName);
|
||||
const parsedNormalizedViewName = splitQualifiedNameLast(normalizedViewName);
|
||||
return {
|
||||
viewName: normalizedViewName,
|
||||
schemaName: String(schemaName || parsedNormalizedViewName.parentPath || parsedViewName.parentPath || '').trim(),
|
||||
};
|
||||
};
|
||||
|
||||
export const isSidebarViewTableType = (tableType: unknown): boolean => {
|
||||
const normalizedType = String(tableType ?? '').trim().toUpperCase();
|
||||
if (!normalizedType) return true;
|
||||
|
||||
Reference in New Issue
Block a user