diff --git a/apps/desktop/src/lib/__tests__/database/jdbcDialect.spec.ts b/apps/desktop/src/lib/__tests__/database/jdbcDialect.spec.ts index 8bb3334924..de2c169b22 100644 --- a/apps/desktop/src/lib/__tests__/database/jdbcDialect.spec.ts +++ b/apps/desktop/src/lib/__tests__/database/jdbcDialect.spec.ts @@ -71,6 +71,7 @@ describe("jdbc dialect inference", () => { driver_label: "CacheDB", }), ).toBe("iris"); + expect(inferJdbcDialect({ db_type: "jdbc", driver_profile: "cache" })).toBe("iris"); }); it("uses IRIS table preview dialect for generic JDBC IRIS connections", () => { diff --git a/apps/desktop/src/lib/database/jdbcDialect.ts b/apps/desktop/src/lib/database/jdbcDialect.ts index 51acd5fb2e..4205a17ed8 100644 --- a/apps/desktop/src/lib/database/jdbcDialect.ts +++ b/apps/desktop/src/lib/database/jdbcDialect.ts @@ -44,7 +44,7 @@ const JDBC_DIALECT_MATCHERS: Array<{ type: DatabaseType; patterns: RegExp[] }> = { type: "informix", patterns: [/jdbc:informix/i, /informix/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] }, + { type: "iris", patterns: [/jdbc:(?:iris|cache):/i, /com\.intersystems\.jdbc\.(?:IRIS|Cache)Driver/i, /intersystems-jdbc/i, /\bcache(?:db)?\b/i] }, ]; // ASE uses Transact-SQL, but treating it as SQL Server globally would also