fix(jdbc): support manual transactions and auto-commit control (#6997)

* fix(jdbc): support manual transactions

* fix(jdbc): preserve paged query transaction state

---------

Co-authored-by: zipg <4047349+zipg@users.noreply.github.com>
This commit is contained in:
zipgandzipg authored and GitHub committed 2026-08-24 14:50:18 +08:00
1 parent c8dbeeaf7d
commit c021fe009b
6 files changed
+662 -55

No files matched your search

@@ -91,6 +91,7 @@ describe("supportsTransaction", () => {
expect(supportsTransaction("postgres")).toBe(true);
expect(supportsTransaction("mysql")).toBe(true);
expect(supportsTransaction("oracle")).toBe(true);
expect(supportsTransaction("jdbc")).toBe(true);
});
it("returns false for unsupported database types", () => {
@@ -238,7 +238,7 @@ export function usesPostgresLikeStructureCopy(dbType?: DatabaseType): boolean {
return !!dbType && PG_LIKE_STRUCTURE_TYPES.has(dbType);
}
const TRANSACTION_SUPPORTED_TYPES: readonly string[] = ["postgres", "mysql", "oracle"];
const TRANSACTION_SUPPORTED_TYPES: readonly string[] = ["postgres", "mysql", "oracle", "jdbc"];
/**
* Returns true if the given database type supports explicit transaction control