fix(duckdb): support multiple schemas beyond default "main"

DuckDB was not recognized as a schema-aware database, so only the
default "main" schema was shown in the object tree and schema selector.
Added DuckDB to schema-aware type lists, implemented schema listing via
information_schema.schemata, and replaced hardcoded table_schema = 'main'
with parameterized queries.
This commit is contained in:
t8y2
2026-05-24 10:26:09 +08:00
parent 065f0a4234
commit 1f666f99b3
7 changed files with 294 additions and 46 deletions
@@ -25,6 +25,7 @@ export const SCHEMA_AWARE_TYPES = new Set<DatabaseType>([
"trino",
"db2",
"tdengine",
"duckdb",
]);
export const SQL_FILE_UNSUPPORTED_TYPES = new Set<DatabaseType>(["redis", "mongodb", "elasticsearch"]);
@@ -201,6 +202,7 @@ export const TREE_SCHEMA_TYPES = new Set<DatabaseType>([
"trino",
"h2",
"tdengine",
"duckdb",
]);
export const PG_LIKE_STRUCTURE_TYPES = new Set<DatabaseType>(["postgres", "redshift", "gaussdb", "opengauss"]);