fix(cache): avoid quoted identifiers and alias lists for cache sql
Closes #8340
This commit is contained in:
5 files changed
+124
-6
No files matched your search
@@ -56,6 +56,20 @@ describe("jdbc dialect inference", () => {
|
||||
jdbc_driver_paths: ["/drivers/intersystems-jdbc-3.10.5.jar"],
|
||||
}),
|
||||
).toBe("iris");
|
||||
// Legacy Caché connections pick the CacheDB.jar from the driver store; the
|
||||
// jar file name and driver label are the only Intersystems markers there.
|
||||
expect(
|
||||
inferJdbcDialect({
|
||||
db_type: "jdbc",
|
||||
jdbc_driver_paths: ["/drivers/CacheDB.jar"],
|
||||
}),
|
||||
).toBe("iris");
|
||||
expect(
|
||||
inferJdbcDialect({
|
||||
db_type: "jdbc",
|
||||
driver_label: "CacheDB",
|
||||
}),
|
||||
).toBe("iris");
|
||||
});
|
||||
|
||||
it("uses IRIS table preview dialect for generic JDBC IRIS connections", () => {
|
||||
@@ -284,6 +298,7 @@ describe("jdbc dialect inference", () => {
|
||||
expect(inferJdbcDialect({ db_type: "jdbc", driver_label: "Kyuubi JDBC", connection_string: "jdbc:hive2://kyuubi.example.com/default" })).toBe("mysql");
|
||||
expect(inferJdbcDialect({ db_type: "jdbc", connection_string: "jdbc:hive2://hiveserver.example.com/default" })).toBe("mysql");
|
||||
expect(inferJdbcDialect({ db_type: "jdbc", connection_string: "jdbc:mysql://mysql.example.com/app" })).toBe("mysql");
|
||||
expect(inferJdbcDialect({ db_type: "jdbc", jdbc_driver_paths: ["/drivers/mysql-connector-j-8.0.33.jar"] })).toBe("mysql");
|
||||
});
|
||||
|
||||
it("prefers explicit Kyuubi identity over Apache Hive product metadata", () => {
|
||||
|
||||
@@ -42,7 +42,9 @@ const JDBC_DIALECT_MATCHERS: Array<{ type: DatabaseType; patterns: RegExp[] }> =
|
||||
{ type: "sqlite", patterns: [/jdbc:sqlite:/i, /sqlite/i] },
|
||||
{ type: "db2", patterns: [/jdbc:db2:/i, /\bdb2\b/i] },
|
||||
{ type: "informix", patterns: [/jdbc:informix/i, /informix/i] },
|
||||
{ type: "iris", patterns: [/jdbc:(?:iris|cache):/i, /com\.intersystems\.jdbc\.(?:IRIS|Cache)Driver/i, /intersystems-jdbc/i] },
|
||||
// CacheDB.jar (legacy Caché driver) carries none of the intersystems URL or
|
||||
// class-name markers, so match the jar file name / driver label directly.
|
||||
{ type: "iris", patterns: [/jdbc:(?:iris|cache):/i, /com\.intersystems\.jdbc\.(?:IRIS|Cache)Driver/i, /intersystems-jdbc/i, /cachedb/i] },
|
||||
];
|
||||
|
||||
// ASE uses Transact-SQL, but treating it as SQL Server globally would also
|
||||
|
||||
Reference in new issue
Block a user