fix(tdengine): keep database context when viewing tables
This commit is contained in:
2 files changed
+16
No files matched your search
@@ -38,6 +38,7 @@ const JDBC_DIALECT_MATCHERS: Array<{ type: DatabaseType; patterns: RegExp[] }> =
|
||||
{ type: "sqlserver", patterns: [/jdbc:sqlserver:/i, /sqlserver/i, /mssql/i] },
|
||||
{ type: "oracle", patterns: [/jdbc:oracle:/i, /oracle/i] },
|
||||
{ type: "clickhouse", patterns: [/jdbc:clickhouse:/i, /clickhouse/i] },
|
||||
{ type: "tdengine", patterns: [/jdbc:taos(?:-rs|-ws)?:/i, /taosdata/i, /tdengine/i] },
|
||||
{ type: "h2", patterns: [/jdbc:h2:/i, /\bh2\b/i] },
|
||||
{ type: "sqlite", patterns: [/jdbc:sqlite:/i, /sqlite/i] },
|
||||
{ type: "db2", patterns: [/jdbc:db2:/i, /\bdb2\b/i] },
|
||||
@@ -214,6 +215,8 @@ export function connectionUsesDatabaseObjectTreeMode(connection?: JdbcDialectCon
|
||||
const dialect = inferJdbcDialect(connection);
|
||||
if (!dialect) return true;
|
||||
if (dialect === "hive" || dialect === "trino") return false;
|
||||
// TDengine exposes databases as the top-level namespace, without schemas.
|
||||
if (dialect === "tdengine") return false;
|
||||
if (dialect === "databend") return true;
|
||||
return !usesTreeSchemaMode(dialect);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user