feat(oracle): support manual query transactions

This commit is contained in:
t8y2 committed 2026-08-21 01:05:59 +08:00
1 parent a7edb8f8db
commit b5d3343f9a
22 files changed
+1011 -99

No files matched your search

@@ -229,7 +229,7 @@ export function usesPostgresLikeStructureCopy(dbType?: DatabaseType): boolean {
return !!dbType && PG_LIKE_STRUCTURE_TYPES.has(dbType);
}
const TRANSACTION_SUPPORTED_TYPES: readonly string[] = ["postgres", "mysql"];
const TRANSACTION_SUPPORTED_TYPES: readonly string[] = ["postgres", "mysql", "oracle"];
/**
* Returns true if the given database type supports explicit transaction control
@@ -238,3 +238,11 @@ const TRANSACTION_SUPPORTED_TYPES: readonly string[] = ["postgres", "mysql"];
export function supportsTransaction(dbType?: string): boolean {
return !!dbType && TRANSACTION_SUPPORTED_TYPES.includes(dbType);
}
/**
* Default auto-commit mode when opening a query tab for the given database type.
* Oracle defaults to manual transactions so edits require an explicit Commit.
*/
export function defaultAutoCommitForDbType(dbType?: string): boolean {
return dbType !== "oracle";
}