fix(postgres): prioritize root tables in sidebar pagination
This commit is contained in:
2 files changed
+7
-4
No files matched your search
@@ -1073,7 +1073,7 @@ export const useConnectionStore = defineStore("connection", () => {
|
||||
}
|
||||
|
||||
function objectGroupCacheKey(node: TreeNode): string {
|
||||
return schemaCacheKey(node.connectionId || "", node.database || "", node.schema || "", node.type, "objects-v4");
|
||||
return schemaCacheKey(node.connectionId || "", node.database || "", node.schema || "", node.type, "objects-v5");
|
||||
}
|
||||
|
||||
function metadataListDriverProfile(connectionId?: string): string | undefined {
|
||||
@@ -3125,7 +3125,7 @@ export const useConnectionStore = defineStore("connection", () => {
|
||||
await ensureConnected(connectionId);
|
||||
if (useCachedChildren(node, options)) return;
|
||||
const simpleObjectDisplay = useSettingsStore().editorSettings.sidebarObjectDisplay === "simple";
|
||||
const cacheKey = schemaCacheKey(connectionId, database, schema || "", simpleObjectDisplay ? "objects-simple-v4" : "objects-grouped-v4");
|
||||
const cacheKey = schemaCacheKey(connectionId, database, schema || "", simpleObjectDisplay ? "objects-simple-v5" : "objects-grouped-v5");
|
||||
const searchFilter = activeTreeLoadSearchFilter(options);
|
||||
const isSidebarTableSearch = !!options?.sidebarTableSearchParentId;
|
||||
if (!options?.force && !searchFilter) {
|
||||
@@ -3383,7 +3383,7 @@ export const useConnectionStore = defineStore("connection", () => {
|
||||
if (!canApplyTreeMetadataResult(parent)) return;
|
||||
parent.objectCount = mergedChildren.length;
|
||||
setChildren(parent, nextChildren);
|
||||
await savePersistedTreeChildren(schemaCacheKey(parentConnectionId, parentDatabase, parent.schema || "", "objects-simple-v4"), nextChildren);
|
||||
await savePersistedTreeChildren(schemaCacheKey(parentConnectionId, parentDatabase, parent.schema || "", "objects-simple-v5"), nextChildren);
|
||||
parent.isExpanded = true;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user