feat: add Highgo (瀚高) database support

Add full support for Highgo database, a PostgreSQL-compatible Chinese
domestic database. Includes database type definition, connection dialog,
agent driver mapping, and database icon.
This commit is contained in:
t8y2
2026-05-15 14:35:19 +08:00
parent f91ccf89c4
commit 2973bb1cd5
12 changed files with 136 additions and 8 deletions
+13 -3
View File
@@ -161,6 +161,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" },
vastbase: { type: "vastbase", port: 5432, user: "vastbase", label: "Vastbase", icon: "vastbase" },
doris: { type: "mysql", port: 9030, user: "root", label: "Doris", icon: "doris", urlParams: "" },
selectdb: {
@@ -338,6 +339,7 @@ function defaultDatabaseForProfile() {
if (form.value.db_type === "redshift") return "dev";
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 === "postgres" || form.value.db_type === "kingbase" || form.value.db_type === "vastbase")
return "postgres";
if (form.value.db_type === "sqlserver") return "master";
@@ -370,6 +372,7 @@ const iconTypeMap: Record<string, string> = {
opengauss: "opengauss",
gaussdb: "gaussdb",
kingbase: "kingbase",
highgo: "highgo",
vastbase: "vastbase",
doris: "doris",
selectdb: "selectdb",
@@ -417,6 +420,7 @@ const dbOptions = [
{ value: "tdengine", label: "TDengine" },
{ value: "opengauss", label: "openGauss" },
{ value: "kingbase", label: "KingBase" },
{ value: "highgo", label: "瀚高 HighGo" },
{ value: "vastbase", label: "Vastbase" },
{ value: "redshift", label: "Redshift" },
{ value: "cockroachdb", label: "CockroachDB" },
@@ -906,10 +910,15 @@ function openExternalUrl(url: string) {
<div class="grid grid-cols-4 items-center gap-4">
<Label class="text-right">{{ t("connection.type") }}</Label>
<div class="col-span-3 flex items-center gap-2 rounded-md border bg-muted/20 px-3 py-2">
<button
type="button"
class="col-span-3 flex items-center gap-2 rounded-md border bg-muted/20 px-3 py-2 hover:bg-muted/40 cursor-pointer transition"
@click="backToDatabasePicker()"
>
<DatabaseIcon :db-type="selectedDbIcon" class="h-4 w-4 shrink-0" />
<span class="min-w-0 flex-1 truncate text-sm">{{ selectedProfile().label }}</span>
</div>
<span class="min-w-0 flex-1 truncate text-sm text-left">{{ selectedProfile().label }}</span>
<Pencil class="h-3 w-3 text-muted-foreground" />
</button>
</div>
<div v-if="isCustomCompatibleProfile()" class="grid grid-cols-4 items-center gap-4">
@@ -1195,6 +1204,7 @@ function openExternalUrl(url: string) {
form.db_type === 'redshift' ||
form.db_type === 'informix' ||
form.db_type === 'kingbase' ||
form.db_type === 'highgo' ||
form.db_type === 'vastbase' ||
form.db_type === 'goldendb'
"
+1
View File
@@ -52,6 +52,7 @@ const assetIcons: Record<string, string> = {
const letterIcons: Record<string, { letter: string; color: string }> = {
goldendb: { letter: "G", color: "#F59E0B" },
vastbase: { letter: "V", color: "#6D28D9" },
highgo: { letter: "瀚", color: "#005bac" },
};
const normalizedType = computed(() => props.dbType.toLowerCase().replace(/[\s-]+/g, "_"));
+6
View File
@@ -8,6 +8,7 @@ export const SCHEMA_AWARE_TYPES = new Set<DatabaseType>([
"dameng",
"gaussdb",
"kingbase",
"highgo",
"vastbase",
"jdbc",
"h2",
@@ -28,6 +29,7 @@ export const DIAGRAM_SUPPORTED_TYPES = new Set<DatabaseType>([
"dameng",
"gaussdb",
"kingbase",
"highgo",
"vastbase",
"goldendb",
"h2",
@@ -46,6 +48,7 @@ export const DATABASE_SEARCH_SUPPORTED_TYPES = new Set<DatabaseType>([
"dameng",
"gaussdb",
"kingbase",
"highgo",
"vastbase",
"goldendb",
"h2",
@@ -75,6 +78,7 @@ export const TABLE_IMPORT_SUPPORTED_TYPES = new Set<DatabaseType>([
"dameng",
"gaussdb",
"kingbase",
"highgo",
"vastbase",
"goldendb",
]);
@@ -115,6 +119,7 @@ export const TREE_SCHEMA_TYPES = new Set<DatabaseType>([
"sqlserver",
"gaussdb",
"kingbase",
"highgo",
"vastbase",
"jdbc",
"trino",
@@ -126,6 +131,7 @@ export const PG_LIKE_STRUCTURE_TYPES = new Set<DatabaseType>(["postgres", "redsh
export const AGENT_DRIVER_TYPES = new Set<DatabaseType>([
"dameng",
"kingbase",
"highgo",
"vastbase",
"goldendb",
"oracle",
+45
View File
@@ -23,6 +23,7 @@ import { isTauriRuntime } from "@/lib/tauriRuntime";
import { isSchemaAware, usesTreeSchemaMode } from "@/lib/databaseCapabilities";
import { buildDatabaseTreeNodes } from "@/lib/databaseTree";
import { buildSqlServerDatabaseTreeNodes, SQLSERVER_DEFAULT_SCHEMA } from "@/lib/sqlServerTree";
import { shouldMarkDisconnected } from "@/lib/connectionHealth";
import {
buildGroupedObjectTreeNodes,
buildTableTreeNodes,
@@ -153,6 +154,14 @@ export const useConnectionStore = defineStore("connection", () => {
return message;
}
function recordMetadataLoadError(connectionId: string, error: unknown) {
if (shouldMarkDisconnected(error)) {
connectedIds.value.delete(connectionId);
if (activeConnectionId.value === connectionId) activeConnectionId.value = null;
}
recordConnectionError(connectionId, error);
}
function normalizeConnection(config: ConnectionConfig): ConnectionConfig {
const labelMap: Record<string, string> = {
mysql: "MySQL",
@@ -171,6 +180,7 @@ export const useConnectionStore = defineStore("connection", () => {
dameng: "DM (Dameng)",
gaussdb: "GaussDB",
kingbase: "KingBase",
highgo: "瀚高 HighGo",
vastbase: "Vastbase",
goldendb: "GoldenDB",
h2: "H2",
@@ -194,6 +204,8 @@ export const useConnectionStore = defineStore("connection", () => {
dbType = "redshift" as ConnectionConfig["db_type"];
} else if (profile === "kingbase" && dbType === "postgres") {
dbType = "kingbase" as ConnectionConfig["db_type"];
} else if (profile === "highgo" && dbType === "postgres") {
dbType = "highgo" as ConnectionConfig["db_type"];
} else if (profile === "vastbase" && dbType === "postgres") {
dbType = "vastbase" as ConnectionConfig["db_type"];
} else if (profile === "goldendb" && dbType === "mysql") {
@@ -588,6 +600,9 @@ export const useConnectionStore = defineStore("connection", () => {
await savePersistedTreeChildren(cacheKey, children);
}
node.isExpanded = true;
} catch (e) {
recordMetadataLoadError(connectionId, e);
throw e;
} finally {
node.isLoading = false;
}
@@ -620,6 +635,9 @@ export const useConnectionStore = defineStore("connection", () => {
),
);
node.isExpanded = true;
} catch (e) {
recordMetadataLoadError(connectionId, e);
throw e;
} finally {
node.isLoading = false;
}
@@ -665,6 +683,9 @@ export const useConnectionStore = defineStore("connection", () => {
),
);
node.isExpanded = true;
} catch (e) {
recordMetadataLoadError(connectionId, e);
throw e;
} finally {
node.isLoading = false;
}
@@ -690,6 +711,9 @@ export const useConnectionStore = defineStore("connection", () => {
})),
);
node.isExpanded = true;
} catch (e) {
recordMetadataLoadError(connectionId, e);
throw e;
} finally {
node.isLoading = false;
}
@@ -720,6 +744,9 @@ export const useConnectionStore = defineStore("connection", () => {
setChildren(node, children);
await savePersistedTreeChildren(cacheKey, children);
node.isExpanded = true;
} catch (e) {
recordMetadataLoadError(connectionId, e);
throw e;
} finally {
node.isLoading = false;
}
@@ -744,6 +771,9 @@ export const useConnectionStore = defineStore("connection", () => {
setChildren(node, children);
await savePersistedTreeChildren(cacheKey, children);
node.isExpanded = true;
} catch (e) {
recordMetadataLoadError(connectionId, e);
throw e;
} finally {
node.isLoading = false;
}
@@ -774,6 +804,9 @@ export const useConnectionStore = defineStore("connection", () => {
setChildren(node, children);
await savePersistedTreeChildren(cacheKey, children);
node.isExpanded = true;
} catch (e) {
recordMetadataLoadError(connectionId, e);
throw e;
} finally {
node.isLoading = false;
}
@@ -865,6 +898,9 @@ export const useConnectionStore = defineStore("connection", () => {
})),
);
node.isExpanded = true;
} catch (e) {
recordMetadataLoadError(connectionId, e);
throw e;
} finally {
node.isLoading = false;
}
@@ -894,6 +930,9 @@ export const useConnectionStore = defineStore("connection", () => {
})),
);
node.isExpanded = true;
} catch (e) {
recordMetadataLoadError(connectionId, e);
throw e;
} finally {
node.isLoading = false;
}
@@ -923,6 +962,9 @@ export const useConnectionStore = defineStore("connection", () => {
})),
);
node.isExpanded = true;
} catch (e) {
recordMetadataLoadError(connectionId, e);
throw e;
} finally {
node.isLoading = false;
}
@@ -952,6 +994,9 @@ export const useConnectionStore = defineStore("connection", () => {
})),
);
node.isExpanded = true;
} catch (e) {
recordMetadataLoadError(connectionId, e);
throw e;
} finally {
node.isLoading = false;
}
+1
View File
@@ -15,6 +15,7 @@ export type DatabaseType =
| "dameng"
| "gaussdb"
| "kingbase"
| "highgo"
| "vastbase"
| "goldendb"
| "h2"