fix(tdengine): keep database context when viewing tables
This commit is contained in:
2 files changed
+16
No files matched your search
@@ -92,6 +92,19 @@ describe("jdbc dialect inference", () => {
|
||||
).toBe("sqlserver");
|
||||
});
|
||||
|
||||
it("detects TDengine JDBC connections and keeps the selected database in the object tree", () => {
|
||||
const connection = {
|
||||
db_type: "jdbc" as const,
|
||||
connection_string: "jdbc:TAOS-RS://tdengine.example:6041/",
|
||||
jdbc_driver_class: "com.taosdata.jdbc.rs.RestfulDriver",
|
||||
};
|
||||
|
||||
expect(inferJdbcDialect(connection)).toBe("tdengine");
|
||||
expect(effectiveDatabaseTypeForConnection(connection)).toBe("tdengine");
|
||||
expect(connectionUsesDatabaseObjectTreeMode(connection)).toBe(false);
|
||||
expect(connectionObjectTreeQuerySchema(connection, "dbx_test")).toBe("dbx_test");
|
||||
});
|
||||
|
||||
it("keeps Phoenix as generic JDBC while preserving its schema tree", () => {
|
||||
const connection = { db_type: "jdbc" as const, driver_profile: "phoenix" };
|
||||
|
||||
|
||||
Reference in new issue
Block a user