Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

fix(gaussdb): persist count query DOP setting

Andrew58b7d8856af7
diff --git a/apps/desktop/src/components/connection/ConnectionDialog.vue b/apps/desktop/src/components/connection/ConnectionDialog.vue
index 739616e48b..e7045c07d2 100644
--- a/apps/desktop/src/components/connection/ConnectionDialog.vue
+++ b/apps/desktop/src/components/connection/ConnectionDialog.vue
@@ -4108,9 +4108,11 @@ function connectionConfigForSubmit(id: string, generatedName = ""): ConnectionCo
} else if (supportsGaussdbIdentifierQuoteStyle(config)) {
const style = gaussdbIdentifierQuoteStyle(config);
const targetServerType = gaussdbTargetServerType(config);
+ const countQueryDop = gaussdbCountQueryDop(config);
config.external_config = undefined;
setGaussdbIdentifierQuoteStyle(config, style);
setGaussdbTargetServerType(config, targetServerType);
+ setGaussdbCountQueryDop(config, countQueryDop);
} else if (!isDoltDriverProfile(config.driver_profile)) {
config.external_config = undefined;
}
diff --git a/apps/desktop/src/lib/__tests__/connection/gaussdbConnectionDialog.spec.ts b/apps/desktop/src/lib/__tests__/connection/gaussdbConnectionDialog.spec.ts
new file mode 100644
index 0000000000..df0ccbc18a
--- /dev/null
+++ b/apps/desktop/src/lib/__tests__/connection/gaussdbConnectionDialog.spec.ts
@@ -0,0 +1,12 @@
+import { readFileSync } from "node:fs";
+import { describe, expect, it } from "vitest";
+
+describe("GaussDB connection dialog persistence", () => {
+ it("preserves count-query DOP in submitted connection configs", () => {
+ const source = readFileSync(new URL("../../../components/connection/ConnectionDialog.vue", import.meta.url), "utf8");
+ const submitConfig = source.slice(source.indexOf("function connectionConfigForSubmit"), source.indexOf("function connectionNameForSubmit"));
+
+ expect(submitConfig).toContain("const countQueryDop = gaussdbCountQueryDop(config);");
+ expect(submitConfig).toContain("setGaussdbCountQueryDop(config, countQueryDop);");
+ });
+});