fix(gbase): support 8a and 8s profiles

This commit is contained in:
t8y2 committed 2026-06-14 10:16:24 +08:00
1 parent 213162aad3
commit cbc7f9b0db
41 files changed
+596 -50

No files matched your search

+4 -2
View File
@@ -915,10 +915,11 @@ export const useConnectionStore = defineStore("connection", () => {
);
const visibleNameSet = new Set(visibleNames);
const visibleDatabases = databases.filter((database) => visibleNameSet.has(database.name));
const effectiveDbType = effectiveDatabaseTypeForConnection(config);
const children = withSavedSqlRoot(
connectionId,
buildDatabaseTreeNodes(connectionId, visibleDatabases, {
includeDefaultWhenEmpty: usesTreeSchemaMode(config?.db_type) || shouldIncludeDefaultDatabaseNode(config, visibleDatabases),
includeDefaultWhenEmpty: usesTreeSchemaMode(effectiveDbType) || shouldIncludeDefaultDatabaseNode(config, visibleDatabases),
}),
node,
);
@@ -1588,9 +1589,10 @@ export const useConnectionStore = defineStore("connection", () => {
await loadMongoCollections(node.connectionId, node.database);
} else if (node.type === "database" && node.connectionId && hasTreeNodeDatabaseContext(node)) {
const config = getConfig(node.connectionId);
const effectiveDbType = effectiveDatabaseTypeForConnection(config);
if (config?.db_type === "sqlserver") {
await loadSqlServerDatabaseObjects(node.connectionId, node.database, options);
} else if (usesTreeSchemaMode(config?.db_type) && !connectionUsesDatabaseObjectTreeMode(config)) {
} else if (usesTreeSchemaMode(effectiveDbType) && !connectionUsesDatabaseObjectTreeMode(config)) {
await loadSchemas(node.connectionId, node.database, options);
} else {
await loadTables(node.connectionId, node.database, undefined, options);
+19 -2
View File
@@ -698,6 +698,15 @@ export const useQueryStore = defineStore("query", () => {
}
}
function setExecutingWithId(id: string, executionId: string) {
const tab = tabs.value.find((t) => t.id === id);
if (!tab) return;
tab.isExecuting = true;
tab.executionId = executionId;
tab.isCancelling = false;
tab.queryExecutionStartedAt = Date.now();
}
function clearExplain(tab: QueryTab) {
tab.explainPlan = undefined;
tab.explainError = undefined;
@@ -952,7 +961,9 @@ export const useQueryStore = defineStore("query", () => {
const elapsed = () => `${Math.round(performance.now() - startedAt)}ms`;
tab.isExecuting = true;
tab.isCancelling = false;
tab.queryExecutionStartedAt = Date.now();
if (!tab.queryExecutionStartedAt) {
tab.queryExecutionStartedAt = Date.now();
}
tab.executionId = executionId;
tab.lastExecutedSql = sql;
if (!options?.preserveTotalRowCountDuringExecution) {
@@ -1413,7 +1424,12 @@ export const useQueryStore = defineStore("query", () => {
const canceled = await api.cancelQuery(executionId);
if (!canceled) {
const current = tabs.value.find((t) => t.id === id);
if (current && current.executionId === executionId) current.isCancelling = false;
if (current && current.executionId === executionId) {
current.isExecuting = false;
current.isCancelling = false;
current.executionId = undefined;
current.queryExecutionStartedAt = undefined;
}
}
return canceled;
} catch (e: any) {
@@ -1698,6 +1714,7 @@ export const useQueryStore = defineStore("query", () => {
tableStructureRefreshVersion,
setObjectSource,
setExecuting,
setExecutingWithId,
setErrorResult,
setActiveResultIndex,
executeCurrentTab,