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。
TypeScript aicliclickhousedatabasedatabase-clientdatabase-managementdockerguimcpmongodbmysqlpostgresqlredisrustsql-serversqlitetaurivue
feat(drivers): add YashanDB built-in support
t8y2fb9582fd2caf
diff --git a/apps/desktop/public/icons/database/yashandb.png b/apps/desktop/public/icons/database/yashandb.pngnew file mode 100644index 0000000000..ef3ab69466Binary files /dev/null and b/apps/desktop/public/icons/database/yashandb.png differdiff --git a/apps/desktop/src/components/connection/ConnectionDialog.vue b/apps/desktop/src/components/connection/ConnectionDialog.vueindex 2c30a2aa35..03b2d07f62 100644--- a/apps/desktop/src/components/connection/ConnectionDialog.vue+++ b/apps/desktop/src/components/connection/ConnectionDialog.vue@@ -163,6 +163,7 @@ const driverProfiles: Record<gaussdb: { type: "gaussdb", port: 5432, user: "gaussdb", label: "GaussDB", icon: "gaussdb" },kingbase: { type: "kingbase", port: 54321, user: "system", label: "KingBase", icon: "kingbase" },highgo: { type: "highgo", port: 5866, user: "highgo", label: "瀚高 HighGo", icon: "highgo" },+ yashandb: { type: "yashandb", port: 1688, user: "sys", label: "崖山 YashanDB", icon: "yashandb" },vastbase: { type: "vastbase", port: 5432, user: "vastbase", label: "Vastbase", icon: "vastbase" },doris: { type: "mysql", port: 9030, user: "root", label: "Doris", icon: "doris", urlParams: "" },selectdb: {@@ -342,6 +343,7 @@ function defaultDatabaseForProfile() {if (form.value.db_type === "gaussdb") return "postgres";if (selectedType.value === "cockroachdb") return "defaultdb";if (form.value.db_type === "highgo") return "highgo";+ if (form.value.db_type === "yashandb") return "yasdb";if (form.value.db_type === "postgres" || form.value.db_type === "kingbase" || form.value.db_type === "vastbase")return "postgres";if (form.value.db_type === "sqlserver") return "master";@@ -376,6 +378,7 @@ const iconTypeMap: Record<string, string> = {gaussdb: "gaussdb",kingbase: "kingbase",highgo: "highgo",+ yashandb: "yashandb",vastbase: "vastbase",doris: "doris",selectdb: "selectdb",@@ -425,6 +428,7 @@ const dbOptions = [{ value: "opengauss", label: "openGauss" },{ value: "kingbase", label: "KingBase" },{ value: "highgo", label: "瀚高 HighGo" },+ { value: "yashandb", label: "崖山 YashanDB" },{ value: "vastbase", label: "Vastbase" },{ value: "redshift", label: "Redshift" },{ value: "cockroachdb", label: "CockroachDB" },@@ -1229,6 +1233,7 @@ function openExternalUrl(url: string) {form.db_type === 'informix' ||form.db_type === 'kingbase' ||form.db_type === 'highgo' ||+ form.db_type === 'yashandb' ||form.db_type === 'vastbase' ||form.db_type === 'goldendb'"diff --git a/apps/desktop/src/components/icons/DatabaseIcon.vue b/apps/desktop/src/components/icons/DatabaseIcon.vueindex d56e59b28e..3b6619dc5d 100644--- a/apps/desktop/src/components/icons/DatabaseIcon.vue+++ b/apps/desktop/src/components/icons/DatabaseIcon.vue@@ -29,6 +29,7 @@ const assetIcons: Record<string, string> = {kingbase: "kingbase",goldendb: "goldendb.png",vastbase: "vastbase.png",+ yashandb: "yashandb.png",snowflake: "snowflake",h2: "h2",dm: "dm",diff --git a/apps/desktop/src/lib/connectionPresentation.ts b/apps/desktop/src/lib/connectionPresentation.tsindex 094a2246d0..5c8d9f9672 100644--- a/apps/desktop/src/lib/connectionPresentation.ts+++ b/apps/desktop/src/lib/connectionPresentation.ts@@ -33,6 +33,7 @@ export function connectionUrlPlaceholder(dbType: DatabaseType): string {case "postgres":case "gaussdb":+ case "yashandb":case "redshift":return "postgresql://user:password@host:port/database";diff --git a/apps/desktop/src/lib/connectionUrl.ts b/apps/desktop/src/lib/connectionUrl.tsindex a53150568d..19752f2762 100644--- a/apps/desktop/src/lib/connectionUrl.ts+++ b/apps/desktop/src/lib/connectionUrl.ts@@ -40,6 +40,7 @@ const SCHEME_PROFILES: Record<string, ConnectionProfile> = {dm: { type: "dameng", profile: "dm", label: "DM (Dameng)", defaultPort: 5236 },dameng: { type: "dameng", profile: "dm", label: "DM (Dameng)", defaultPort: 5236 },gaussdb: { type: "gaussdb", profile: "gaussdb", label: "GaussDB", defaultPort: 5432 },+ yashandb: { type: "yashandb", profile: "yashandb", label: "崖山 YashanDB", defaultPort: 1688 },opengauss: { type: "gaussdb", profile: "opengauss", label: "openGauss", defaultPort: 5432 },tdengine: { type: "tdengine", profile: "tdengine", label: "TDengine", defaultPort: 6041 },"taos-ws": { type: "tdengine", profile: "tdengine", label: "TDengine", defaultPort: 6041 },diff --git a/apps/desktop/src/lib/databaseCapabilitySets.ts b/apps/desktop/src/lib/databaseCapabilitySets.tsindex 36e82d2d72..1711bfa50e 100644--- a/apps/desktop/src/lib/databaseCapabilitySets.ts+++ b/apps/desktop/src/lib/databaseCapabilitySets.ts@@ -10,6 +10,7 @@ export const SCHEMA_AWARE_TYPES = new Set<DatabaseType>(["kingbase","highgo","vastbase",+ "yashandb","jdbc","h2","snowflake",@@ -33,6 +34,7 @@ export const DIAGRAM_SUPPORTED_TYPES = new Set<DatabaseType>(["highgo","vastbase","goldendb",+ "yashandb","access","h2","db2",@@ -53,6 +55,7 @@ export const DATABASE_SEARCH_SUPPORTED_TYPES = new Set<DatabaseType>(["highgo","vastbase","goldendb",+ "yashandb","access","h2","snowflake",@@ -85,6 +88,7 @@ export const TABLE_IMPORT_SUPPORTED_TYPES = new Set<DatabaseType>(["highgo","vastbase","goldendb",+ "yashandb","access",]);@@ -132,6 +136,7 @@ export const TREE_SCHEMA_TYPES = new Set<DatabaseType>(["kingbase","highgo","vastbase",+ "yashandb","jdbc","trino","h2",@@ -145,6 +150,7 @@ export const AGENT_DRIVER_TYPES = new Set<DatabaseType>(["kingbase","highgo","vastbase",+ "yashandb","goldendb","access","oracle",diff --git a/apps/desktop/src/stores/connectionStore.ts b/apps/desktop/src/stores/connectionStore.tsindex 3505442eb1..635dbe6a46 100644--- a/apps/desktop/src/stores/connectionStore.ts+++ b/apps/desktop/src/stores/connectionStore.ts@@ -194,6 +194,7 @@ export const useConnectionStore = defineStore("connection", () => {gaussdb: "GaussDB",kingbase: "KingBase",highgo: "瀚高 HighGo",+ yashandb: "崖山 YashanDB",vastbase: "Vastbase",goldendb: "GoldenDB",access: "Microsoft Access",diff --git a/apps/desktop/src/types/database.ts b/apps/desktop/src/types/database.tsindex 2493708965..20660ec343 100644--- a/apps/desktop/src/types/database.ts+++ b/apps/desktop/src/types/database.ts@@ -18,6 +18,7 @@ export type DatabaseType =| "highgo"| "vastbase"| "goldendb"+ | "yashandb"| "access"| "h2"| "snowflake"diff --git a/crates/dbx-core/src/connection.rs b/crates/dbx-core/src/connection.rsindex 74b099365a..39364a1888 100644--- a/crates/dbx-core/src/connection.rs+++ b/crates/dbx-core/src/connection.rs@@ -232,6 +232,7 @@ impl AppState {| DatabaseType::Highgo| DatabaseType::Vastbase| DatabaseType::Goldendb+ | DatabaseType::Yashandb| DatabaseType::Oracle| DatabaseType::H2| DatabaseType::Snowflakediff --git a/crates/dbx-core/src/database_capabilities.rs b/crates/dbx-core/src/database_capabilities.rsindex bdca405177..f0a2eef3a4 100644--- a/crates/dbx-core/src/database_capabilities.rs+++ b/crates/dbx-core/src/database_capabilities.rs@@ -7,6 +7,7 @@ pub fn agent_key(db_type: &DatabaseType, driver_profile: Option<&str>) -> OptionDatabaseType::Highgo => Some("highgo"),DatabaseType::Vastbase => Some("vastbase"),DatabaseType::Goldendb => Some("goldendb"),+ DatabaseType::Yashandb => Some("yashandb"),DatabaseType::Oracle => match driver_profile {Some("oracle-10g") => Some("oracle-10g"),_ => Some("oracle"),@@ -45,6 +46,7 @@ pub fn is_single_connection_pool(db_type: &DatabaseType) -> bool {| DatabaseType::Highgo| DatabaseType::Vastbase| DatabaseType::Goldendb+ | DatabaseType::Yashandb| DatabaseType::Access| DatabaseType::Jdbc)diff --git a/crates/dbx-core/src/models/connection.rs b/crates/dbx-core/src/models/connection.rsindex 4db3524de4..86ed00bd2d 100644--- a/crates/dbx-core/src/models/connection.rs+++ b/crates/dbx-core/src/models/connection.rs@@ -128,6 +128,7 @@ pub enum DatabaseType {Vastbase,Goldendb,Gaussdb,+ Yashandb,Access,#[serde(rename = "h2")]H2,@@ -175,6 +176,7 @@ impl ConnectionConfig {DatabaseType::Gaussdb => Some("postgres"),DatabaseType::Kingbase | DatabaseType::Vastbase => Some("postgres"),DatabaseType::Highgo => Some("highgo"),+ DatabaseType::Yashandb => Some("yasdb"),_ => None,}}@@ -267,6 +269,7 @@ impl ConnectionConfig {DatabaseType::Vastbase => format!("vastbase://{host}:{port}{db_part}"),DatabaseType::Goldendb => format!("goldendb://{host}:{port}{db_part}"),DatabaseType::Gaussdb => format!("gaussdb://{host}:{port}{db_part}"),+ DatabaseType::Yashandb => format!("yashandb://{host}:{port}{db_part}"),DatabaseType::H2 => format!("h2://{host}:{port}{db_part}"),DatabaseType::Snowflake => format!("snowflake://{host}/{db_part}"),DatabaseType::Trino => format!("trino://{host}:{port}{db_part}"),@@ -366,6 +369,9 @@ impl ConnectionConfig {DatabaseType::Gaussdb => {format!("gaussdb://{}:{}@{host}:{port}{db_part}", username, password)}+ DatabaseType::Yashandb => {+ format!("yashandb://{}:{}@{host}:{port}{db_part}", username, password)+ }DatabaseType::H2 => {format!("h2://{}:{}@{host}:{port}{db_part}", username, password)}@@ -816,6 +822,14 @@ mod tests {assert_eq!(config.connection_url(), "gaussdb://gaussdb:[email protected]:2883/postgres");}+ #[test]+ fn yashandb_url_defaults_to_yasdb_database() {+ let mut config = mysql_config("sys", "secret", None);+ config.db_type = DatabaseType::Yashandb;++ assert_eq!(config.connection_url(), "yashandb://sys:[email protected]:2883/yasdb");+ }+#[test]fn mongodb_form_url_without_params_does_not_force_topology_or_auth() {let config = mongodb_config("root", "secret", Some("admin"));diff --git a/crates/dbx-core/tests/database_capabilities.rs b/crates/dbx-core/tests/database_capabilities.rsindex 4337f3b12d..1668ce956d 100644--- a/crates/dbx-core/tests/database_capabilities.rs+++ b/crates/dbx-core/tests/database_capabilities.rs@@ -9,6 +9,7 @@ fn maps_agent_database_types_to_driver_keys() {assert_eq!(agent_key(&DatabaseType::Hive, None), Some("hive"));assert_eq!(agent_key(&DatabaseType::Gaussdb, None), Some("gaussdb"));assert_eq!(agent_key(&DatabaseType::Tdengine, None), Some("tdengine"));+ assert_eq!(agent_key(&DatabaseType::Yashandb, None), Some("yashandb"));assert_eq!(agent_key(&DatabaseType::Access, None), Some("access"));assert_eq!(agent_key(&DatabaseType::Oracle, None), Some("oracle"));assert_eq!(agent_key(&DatabaseType::Oracle, Some("oracle-10g")), Some("oracle-10g"));@@ -21,6 +22,7 @@ fn classifies_agent_database_types() {assert!(is_agent_type(&DatabaseType::Trino));assert!(is_agent_type(&DatabaseType::Hive));assert!(is_agent_type(&DatabaseType::Tdengine));+ assert!(is_agent_type(&DatabaseType::Yashandb));assert!(is_agent_type(&DatabaseType::Access));assert!(!is_agent_type(&DatabaseType::Mysql));assert!(!is_agent_type(&DatabaseType::Jdbc));@@ -33,6 +35,7 @@ fn identifies_single_connection_pool_types() {assert!(is_single_connection_pool(&DatabaseType::Oracle));assert!(is_single_connection_pool(&DatabaseType::Dameng));assert!(is_single_connection_pool(&DatabaseType::Access));+ assert!(is_single_connection_pool(&DatabaseType::Yashandb));assert!(is_single_connection_pool(&DatabaseType::Jdbc));assert!(!is_single_connection_pool(&DatabaseType::Trino));assert!(!is_single_connection_pool(&DatabaseType::Postgres));@@ -56,6 +59,7 @@ fn skips_tcp_probe_for_local_file_plugin_and_agent_types() {assert!(skips_tcp_probe(&DatabaseType::Trino));assert!(skips_tcp_probe(&DatabaseType::Oracle));assert!(skips_tcp_probe(&DatabaseType::Tdengine));+ assert!(skips_tcp_probe(&DatabaseType::Yashandb));assert!(!skips_tcp_probe(&DatabaseType::Postgres));assert!(!skips_tcp_probe(&DatabaseType::Mysql));}diff --git a/src-tauri/src/commands/agents.rs b/src-tauri/src/commands/agents.rsindex 00cc5cd338..464013c0d2 100644--- a/src-tauri/src/commands/agents.rs+++ b/src-tauri/src/commands/agents.rs@@ -36,6 +36,7 @@ const AGENT_TYPES: &[(&str, &str)] = &[("kylin", "Apache Kylin"),("sundb", "SunDB"),("gaussdb", "GaussDB"),+ ("yashandb", "崖山 YashanDB"),("tdengine", "TDengine"),("mongodb", "MongoDB (Legacy)"),];@@ -112,6 +113,7 @@ mod tests {let agents = build_agent_list(&manager, None);assert!(agents.iter().any(|agent| agent.db_type == "tdengine" && agent.label == "TDengine"));+ assert!(agents.iter().any(|agent| agent.db_type == "yashandb" && agent.label == "崖山 YashanDB"));assert!(agents.iter().any(|agent| agent.db_type == "access" && agent.label == "Microsoft Access"));let _ = std::fs::remove_dir_all(dir);}