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

Method getTransactionContext

packages/core/src/EntityManager.ts:2651–2653  ·  view source on GitHub ↗

* Gets the transaction context (driver dependent object used to make sure queries are executed on same connection).

()

Source from the content-addressed store, hash-verified

2649 * Gets the transaction context (driver dependent object used to make sure queries are executed on same connection).
2650 */
2651 getTransactionContext<T extends Transaction = Transaction>(): T | undefined {
2652 return this.getContext(false).#transactionContext as T;
2653 }
2654
2655 /**
2656 * Returns the cancellation defaults configured on this EntityManager (via `em.fork({ signal })`

Callers 15

aggregateMethod · 0.80
streamAggregateMethod · 0.80
countByMethod · 0.80
createQueryBuilderMethod · 0.80
getKyselyMethod · 0.80
executeMethod · 0.80
clearMethod · 0.80
handleMethod · 0.80
suspendTransactionMethod · 0.80
doCommitMethod · 0.80
lockPessimisticMethod · 0.80

Calls 1

getContextMethod · 0.95

Tested by 1

workFunction · 0.64