diff --git a/apps/desktop/src/components/transfer/__tests__/transferConnections.spec.ts b/apps/desktop/src/components/transfer/__tests__/transferConnections.spec.ts index 1a113c0566..b9c39c89f6 100644 --- a/apps/desktop/src/components/transfer/__tests__/transferConnections.spec.ts +++ b/apps/desktop/src/components/transfer/__tests__/transferConnections.spec.ts @@ -28,6 +28,7 @@ const connections: ConnectionConfig[] = [ { id: "pg-source", name: "PostgreSQL Source", db_type: "postgres", host: "localhost", port: 5432, username: "test", password: "" }, { id: "h2-local-id", name: "Local H2", db_type: "h2", driver_profile: "h2-v3", host: "", port: 0, username: "sa", password: "", database: "mem:transfer-test" }, { id: "h2-jdbc-id", name: "JDBC H2", db_type: "jdbc", connection_string: "jdbc:h2:mem:transfer-test", host: "", port: 0, username: "sa", password: "" }, + { id: "yashandb-id", name: "YashanDB", db_type: "yashandb", host: "localhost", port: 1688, username: "test", password: "" }, { id: "redis-id", name: "Redis", db_type: "redis", host: "localhost", port: 6379, username: "", password: "" }, { id: "unknown-jdbc-id", name: "Unknown JDBC", db_type: "jdbc", host: "localhost", port: 0, username: "", password: "" }, ]; @@ -83,6 +84,7 @@ describe("data transfer connection choices", () => { const picker = container.querySelector(`[data-side="${side}"]`)!; expect(picker.querySelector('[data-picker-connection="h2-local-id"]')?.textContent).toContain("Local H2"); expect(picker.querySelector('[data-picker-connection="h2-jdbc-id"]')?.textContent).toContain("JDBC H2"); + expect(picker.querySelector('[data-picker-connection="yashandb-id"]')?.textContent).toContain("YashanDB"); expect(picker.querySelector('[data-picker-connection="redis-id"]')).toBeNull(); expect(picker.querySelector('[data-picker-connection="unknown-jdbc-id"]')).toBeNull(); } @@ -94,7 +96,7 @@ describe("data transfer connection choices", () => { expect(selection.source).toBe(source); }); - it.each(["h2-local-id", "h2-jdbc-id"])("resolves the prefilled %s to its connection name", async (source) => { + it.each(["h2-local-id", "h2-jdbc-id", "yashandb-id"])("resolves the prefilled %s to its connection name", async (source) => { const { container } = await mountTransferPickers(source); const trigger = container.querySelector('[data-side="source"] button'); expect(trigger?.textContent).toContain(connections.find((connection) => connection.id === source)!.name); diff --git a/apps/desktop/src/lib/database/__tests__/transferObjectKinds.spec.ts b/apps/desktop/src/lib/database/__tests__/transferObjectKinds.spec.ts index 937f607604..9a52d7badb 100644 --- a/apps/desktop/src/lib/database/__tests__/transferObjectKinds.spec.ts +++ b/apps/desktop/src/lib/database/__tests__/transferObjectKinds.spec.ts @@ -4,7 +4,7 @@ import { manifestDatabaseTypes } from "@/lib/database/databaseDriverManifest"; import { supportsTransfer } from "@/lib/database/databaseFeatureSupport"; import type { DatabaseType } from "@/types/database"; -const TABLE_ONLY_TRANSFER_DATABASES: DatabaseType[] = ["sqlite", "rqlite", "turso", "cloudflare-d1", "duckdb", "clickhouse", "mongodb", "highgo", "vastbase", "goldendb", "questdb", "h2", "hive", "argo", "kyuubi", "impala", "spark"]; +const TABLE_ONLY_TRANSFER_DATABASES: DatabaseType[] = ["sqlite", "rqlite", "turso", "cloudflare-d1", "duckdb", "clickhouse", "mongodb", "highgo", "vastbase", "goldendb", "yashandb", "questdb", "h2", "hive", "argo", "kyuubi", "impala", "spark"]; describe("transferObjectKinds", () => { it("groups databases into transfer families", () => { diff --git a/crates/dbx-core/assets/database-drivers.manifest.json b/crates/dbx-core/assets/database-drivers.manifest.json index 3050684650..9bb832dcc8 100644 --- a/crates/dbx-core/assets/database-drivers.manifest.json +++ b/crates/dbx-core/assets/database-drivers.manifest.json @@ -1231,7 +1231,7 @@ "tableDataEdit": true, "tableStructureEdit": true, "tableImport": true, - "dataTransfer": false, + "dataTransfer": true, "sqlFileExecution": true, "databaseCreate": true, "fieldLineage": false, diff --git a/crates/dbx-core/tests/database_capabilities.rs b/crates/dbx-core/tests/database_capabilities.rs index 0211a5f438..61023d1b08 100644 --- a/crates/dbx-core/tests/database_capabilities.rs +++ b/crates/dbx-core/tests/database_capabilities.rs @@ -491,6 +491,19 @@ fn vastbase_declares_data_transfer_support() { assert!(vastbase.capabilities.data_transfer); } +#[test] +fn yashandb_declares_data_transfer_support() { + let manifest = driver_manifest(); + let yashandb = manifest + .drivers + .iter() + .find(|driver| driver.db_type == DatabaseType::Yashandb) + .expect("YashanDB manifest entry"); + + assert!(yashandb.capabilities.table_import); + assert!(yashandb.capabilities.data_transfer); +} + #[test] fn xugu_declares_table_import_support() { let manifest = driver_manifest(); diff --git a/plugins/connection-types/yashandb.yaml b/plugins/connection-types/yashandb.yaml index fc016bc1e0..f204899174 100644 --- a/plugins/connection-types/yashandb.yaml +++ b/plugins/connection-types/yashandb.yaml @@ -27,7 +27,7 @@ capabilities: tableDataEdit: true tableStructureEdit: true tableImport: true - dataTransfer: false + dataTransfer: true sqlFileExecution: true databaseCreate: true fieldLineage: false