feat(sidebar): lazily load database object groups

This commit is contained in:
t8y2 committed 2026-06-07 23:44:40 +08:00
1 parent cdad4a32ff
commit 7bd8d29a79
15 files changed
+484 -68

No files matched your search

@@ -350,14 +350,19 @@ async function toggle() {
return;
}
if (
if (node.type === "group-partitions") {
node.isExpanded = !node.isExpanded;
emit("node-toggled", node, wasExpanded);
return;
}
const databaseObjectGroup =
node.type === "group-tables" ||
node.type === "group-views" ||
node.type === "group-procedures" ||
node.type === "group-functions" ||
node.type === "group-packages" ||
node.type === "group-partitions"
) {
node.type === "group-packages";
if (databaseObjectGroup && connectionStore.isTreeNodeChildrenLoaded(node.id)) {
node.isExpanded = !node.isExpanded;
emit("node-toggled", node, wasExpanded);
return;
@@ -428,6 +433,8 @@ async function toggle() {
node.tableName
) {
await connectionStore.loadTriggers(node.connectionId, node.database, node.tableName, node.schema, node.id);
} else if (databaseObjectGroup) {
await connectionStore.loadObjectGroupChildren(node);
}
emit("node-toggled", node, wasExpanded);
} catch (e: any) {