feat(uxdb): add UXDB database support

This commit is contained in:
t8y2 committed 2026-07-24 21:15:06 +08:00
1 parent 3035800658
commit 7ee335e38a
65 files changed
+697 -96

No files matched your search

@@ -10,6 +10,7 @@ export const SCHEMA_AWARE_TYPES = new Set<DatabaseType>([
"kwdb",
"kingbase",
"highgo",
"uxdb",
"vastbase",
"yashandb",
"databricks",
@@ -57,6 +58,7 @@ export const TREE_SCHEMA_TYPES = new Set<DatabaseType>([
"kwdb",
"kingbase",
"highgo",
"uxdb",
"vastbase",
"yashandb",
"databricks",
@@ -41,6 +41,7 @@ export const DATABASE_NAMESPACE_CREATION_MATRIX = {
gaussdb: { connection: "database", database: "schema" },
kingbase: { connection: "database", database: "schema" },
highgo: { connection: "database", database: "schema" },
uxdb: { database: "schema" },
vastbase: { connection: "database", database: "schema" },
goldendb: { connection: "database" },
kwdb: { connection: "database", database: "schema" },
@@ -26,6 +26,7 @@ const DATABASE_TYPE_OBJECTS = new Map<DatabaseType, SidebarObjectKind[]>([
// postgres like
["kingbase", POSTGRES_LIKE_OBJECTS],
["highgo", POSTGRES_LIKE_OBJECTS],
["uxdb", POSTGRES_LIKE_OBJECTS],
["vastbase", POSTGRES_LIKE_OBJECTS],
["redshift", POSTGRES_LIKE_OBJECTS],
// oracle
@@ -13,7 +13,7 @@ type PropertyEditConnection = Pick<ConnectionConfig, "db_type" | "driver_profile
type DatabaseNode = Pick<{ type: TreeNodeType; database?: string | null }, "type" | "database">;
type SchemaNode = Pick<{ type: TreeNodeType; database?: string | null; schema?: string | null }, "type" | "database" | "schema">;
const POSTGRES_COMMENT_TYPES = new Set<DatabaseType>(["postgres", "gaussdb", "kwdb", "kingbase", "highgo", "vastbase", "opengauss", "yashandb"]);
const POSTGRES_COMMENT_TYPES = new Set<DatabaseType>(["postgres", "gaussdb", "kwdb", "kingbase", "highgo", "uxdb", "vastbase", "opengauss", "yashandb"]);
export const DATABASE_PROPERTY_EDITING_MATRIX = {
mysql: { database: ["charsetCollation"] },
@@ -42,6 +42,7 @@ export const DATABASE_PROPERTY_EDITING_MATRIX = {
gaussdb: { database: ["databaseComment"], schema: ["schemaComment"] },
kingbase: { database: ["databaseComment"], schema: ["schemaComment"] },
highgo: { database: ["databaseComment"], schema: ["schemaComment"] },
uxdb: { database: ["databaseComment"], schema: ["schemaComment"] },
vastbase: { database: ["databaseComment"], schema: ["schemaComment"] },
goldendb: { database: ["charsetCollation"] },
kwdb: { database: ["databaseComment"], schema: ["schemaComment"] },
@@ -64,6 +64,7 @@ const NAVICAT_STYLE_TABLE_DATA_TYPES = new Set<DatabaseType>([
"kwdb",
"kingbase",
"highgo",
"uxdb",
"vastbase",
"goldendb",
"yashandb",
+3 -3
View File
@@ -87,8 +87,8 @@ export function buildTruncateTableSql(options: TableAdminSqlOptions): Promise<st
return api.buildTruncateTableSql(options);
}
const DROP_TABLE_CASCADE_DATABASE_TYPES: readonly DatabaseType[] = ["postgres", "redshift", "gaussdb", "kwdb", "kingbase", "highgo", "vastbase", "opengauss"];
const TRUNCATE_TABLE_CASCADE_DATABASE_TYPES: readonly DatabaseType[] = ["postgres", "gaussdb", "kwdb", "kingbase", "highgo", "vastbase", "opengauss"];
const DROP_TABLE_CASCADE_DATABASE_TYPES: readonly DatabaseType[] = ["postgres", "redshift", "gaussdb", "kwdb", "kingbase", "highgo", "uxdb", "vastbase", "opengauss"];
const TRUNCATE_TABLE_CASCADE_DATABASE_TYPES: readonly DatabaseType[] = ["postgres", "gaussdb", "kwdb", "kingbase", "highgo", "uxdb", "vastbase", "opengauss"];
export function supportsDropTableCascade(databaseType?: DatabaseType): boolean {
return !!databaseType && DROP_TABLE_CASCADE_DATABASE_TYPES.includes(databaseType);
@@ -111,7 +111,7 @@ export function buildDropSchemaSql(options: SchemaNameSqlOptions): Promise<strin
}
export function supportsSchemaComment(databaseType?: DatabaseType): boolean {
return ["postgres", "gaussdb", "kwdb", "kingbase", "highgo", "vastbase", "opengauss", "yashandb"].includes(databaseType || "");
return ["postgres", "gaussdb", "kwdb", "kingbase", "highgo", "uxdb", "vastbase", "opengauss", "yashandb"].includes(databaseType || "");
}
export function buildUpdateDatabasePropertiesSql(options: DatabasePropertyEditSqlOptions): Promise<string> {
@@ -42,6 +42,7 @@ const SCHEMA_FIRST_QUALIFIER_TYPES = new Set<DatabaseType>([
"opengauss",
"kingbase",
"highgo",
"uxdb",
"vastbase",
"yashandb",
"oracle",
@@ -14,6 +14,7 @@ const SYSTEM_DATABASE_RULES: Partial<Record<DatabaseType, ReadonlySet<string>>>
questdb: new Set(["template0", "template1"]),
kingbase: new Set(["template0", "template1"]),
highgo: new Set(["template0", "template1"]),
uxdb: new Set(["template0", "template1"]),
vastbase: new Set(["template0", "template1"]),
redshift: new Set(["template0", "template1"]),
clickhouse: new Set(["information_schema", "system"]),