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

Function withAbortContext

packages/sql/src/AbstractSqlDriver.ts:89–98  ·  view source on GitHub ↗

* Returns a `loggerContext` payload that carries the abort fields alongside any existing * context. The connection layer strips them before logging — this avoids widening the public * `Connection.execute()` signature.

(
  loggerContext: LoggingOptions | undefined,
  options?: AbortQueryOptions,
)

Source from the content-addressed store, hash-verified

87 * `Connection.execute()` signature.
88 */
89function withAbortContext(
90 loggerContext: LoggingOptions | undefined,
91 options?: AbortQueryOptions,
92): LoggingOptions | undefined {
93 const abort = pickAbortOptions(options);
94 if (!abort) {
95 return loggerContext;
96 }
97 return { ...(loggerContext as Dictionary), ...abort } as LoggingOptions;
98}
99
100/** Base class for SQL database drivers, implementing find/insert/update/delete using QueryBuilder. */
101export abstract class AbstractSqlDriver<

Callers 4

nativeInsertManyFunction · 0.85
nativeUpdateManyFunction · 0.85

Calls 1

pickAbortOptionsFunction · 0.85

Tested by

no test coverage detected