MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / isReadOnlyRoutine

Function isReadOnlyRoutine

packages/oracledb/src/OracleConnection.ts:38–44  ·  view source on GitHub ↗

Read-only functions can run on a separate Oracle connection inside an EM transaction — write-ish routines would silently auto-commit.

(routine: Routine)

Source from the content-addressed store, hash-verified

36
37/** Read-only functions can run on a separate Oracle connection inside an EM transaction — write-ish routines would silently auto-commit. */
38function isReadOnlyRoutine(routine: Routine): boolean {
39 if (routine.type !== 'function') {
40 return false;
41 }
42
43 return routine.dataAccess === 'no-sql' || routine.dataAccess === 'reads-sql-data';
44}
45
46export class OracleConnection extends AbstractSqlConnection {
47 private oraclePool?: oracledb.Pool;

Callers 1

callRoutineMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected