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(ci): copy connection-types in docker image and align auto-commit tests

t8y20aa1fb9d7e39
diff --git a/apps/desktop/src/stores/__tests__/queryStore.hiddenPrimaryKey.spec.ts b/apps/desktop/src/stores/__tests__/queryStore.hiddenPrimaryKey.spec.ts
index abdc3d44d6..8e8f58424f 100644
--- a/apps/desktop/src/stores/__tests__/queryStore.hiddenPrimaryKey.spec.ts
+++ b/apps/desktop/src/stores/__tests__/queryStore.hiddenPrimaryKey.spec.ts
@@ -794,6 +794,8 @@ describe("queryStore hidden primary key editing", () => {
const { useQueryStore } = await import("@/stores/queryStore");
const store = useQueryStore();
const tabId = store.createTab("oracle-1", "ORCL", "Query");
+ // Tabs default to auto-commit; exercise the explicit manual-transaction path.
+ store.setAutoCommit(tabId, false);
const execution = store.executeTabSql(tabId, "SELECT t.* FROM APP.WIDE_TABLE t");
await vi.waitFor(() => expect(listIndexes).toHaveBeenCalled());
@@ -830,6 +832,8 @@ describe("queryStore hidden primary key editing", () => {
const { useQueryStore } = await import("@/stores/queryStore");
const store = useQueryStore();
const tabId = store.createTab("oracle-1", "ORCL", "Query");
+ // Tabs default to auto-commit; exercise the explicit manual-transaction path.
+ store.setAutoCommit(tabId, false);
const execution = store.executeTabSql(tabId, "SELECT t.* FROM APP.WIDE_TABLE t");
await vi.waitFor(() => expect(listIndexes).toHaveBeenCalled());
diff --git a/apps/desktop/src/stores/__tests__/queryStore.manualTransactionExpiry.spec.ts b/apps/desktop/src/stores/__tests__/queryStore.manualTransactionExpiry.spec.ts
index 8169d7cc74..eabce2e942 100644
--- a/apps/desktop/src/stores/__tests__/queryStore.manualTransactionExpiry.spec.ts
+++ b/apps/desktop/src/stores/__tests__/queryStore.manualTransactionExpiry.spec.ts
@@ -102,6 +102,8 @@ describe("queryStore manual transaction expiry recovery", () => {
const { useQueryStore } = await import("@/stores/queryStore");
const store = useQueryStore();
const tabId = store.createTab("oracle-1", "ORCL", "Query", "query", "APP");
+ // Tabs default to auto-commit; the expiry recovery path only applies to manual transactions.
+ store.setAutoCommit(tabId, false);
await store.executeTabSql(tabId, "UPDATE USERS SET ACTIVE = 1");
await store.executeTabSql(tabId, "UPDATE USERS SET ACTIVE = 1");
diff --git a/deploy/Dockerfile b/deploy/Dockerfile
index 3125d3e0f0..8b7b8ce3b6 100644
--- a/deploy/Dockerfile
+++ b/deploy/Dockerfile
@@ -64,7 +64,11 @@ RUN case "$TARGETARCH" in \
# Copy real sources and rebuild (only application code recompiles)
COPY crates/ crates/
+# dbx-core's build.rs embeds plugins/dialects (SQL dialects) and
+# plugins/connection-types (database manifest + DatabaseType enum);
+# either directory missing makes the build script panic.
COPY plugins/dialects/ plugins/dialects/
+COPY plugins/connection-types/ plugins/connection-types/
# Docker COPY preserves original file timestamps, which may be older than the
# dummy-source binary compiled above. Touch all .rs files so cargo detects the
diff --git a/packages/app-tests/queryStore.test.ts b/packages/app-tests/queryStore.test.ts
index 0d3e2e01d6..dcb2b6dbd8 100644
--- a/packages/app-tests/queryStore.test.ts
+++ b/packages/app-tests/queryStore.test.ts
@@ -296,7 +296,7 @@ test("external SQL file paths persist with open query tabs", async () => {
}
});
-test("legacy Oracle query tabs restore with the manual transaction default", async () => {
+test("legacy Oracle query tabs restore with the auto-commit default", async () => {
const restoreStorage = installMemoryStorage();
try {
setActivePinia(createPinia());
@@ -317,7 +317,7 @@ test("legacy Oracle query tabs restore with the manual transaction default", asy
store = useQueryStore();
await store.initOpenTabs();
- assert.equal(store.tabs.find((tab) => tab.id === tabId)?.autoCommit, false);
+ assert.equal(store.tabs.find((tab) => tab.id === tabId)?.autoCommit, true);
} finally {
restoreStorage();
}