fix(db2): use schema tree mode for sidebar object loading

This commit is contained in:
t8y2 2026-05-22 14:52:12 +08:00
parent e71f1da19a
commit 0655d309d8
5 changed files with 9 additions and 0 deletions

View File

@ -183,6 +183,7 @@ export const TREE_SCHEMA_TYPES = new Set<DatabaseType>([
"postgres",
"redshift",
"sqlserver",
"db2",
"gaussdb",
"kingbase",
"highgo",

View File

@ -23,6 +23,7 @@ pub mod table_import;
pub mod transfer;
pub mod types;
pub mod update;
pub mod xlsx_export;
pub const R2_CDN_BASE: &str = "https://dl.dbxio.com/";

View File

@ -24,6 +24,11 @@ test("treats Trino catalogs as schema tree roots", () => {
assert.equal(TREE_SCHEMA_TYPES.has("trino"), true);
});
test("treats DB2 databases as schema tree roots", () => {
assert.equal(TREE_SCHEMA_TYPES.has("db2"), true);
assert.equal(usesTreeSchemaMode("db2"), true);
});
test("treats TDengine databases as schema tree roots and agent driver databases", () => {
assert.equal(TREE_SCHEMA_TYPES.has("tdengine"), true);
assert.equal(SCHEMA_AWARE_TYPES.has("tdengine"), true);

View File

@ -22,3 +22,4 @@ pub mod system_fonts;
pub mod table_import;
pub mod transfer;
pub mod update;
pub mod xlsx_export;

View File

@ -337,6 +337,7 @@ pub fn run() {
commands::transfer::cancel_transfer,
commands::database_export::export_database_sql,
commands::database_export::cancel_database_export,
commands::xlsx_export::export_query_result_xlsx,
commands::agents::list_installed_agents,
commands::agents::list_installed_agents_local,
commands::agents::install_agent,