MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / withQueryContext

Function withQueryContext

packages/core/fumadb/src/query/orm/index.ts:448–457  ·  view source on GitHub ↗
(
  db: AbstractQuery<S>,
  context: TContext,
)

Source from the content-addressed store, hash-verified

446}
447
448export function withQueryContext<S extends AnySchema, TContext>(
449 db: AbstractQuery<S>,
450 context: TContext,
451): AbstractQuery<S> {
452 if (typeof db.withContext === "function") return db.withContext(context);
453
454 throw new Error(
455 "[FumaDB] Cannot apply query context to this query object. If you wrap an AbstractQuery, forward withContext so table policies keep using the wrapper.",
456 );
457}

Callers 15

touchSubjectFunction · 0.90
createExecutorFunction · 0.90
makeAdminFunction · 0.90
getFunction · 0.90
makeTestConfigFunction · 0.90
scopedToFunction · 0.90
subjectsOfFunction · 0.90
seedTenantsFunction · 0.90

Calls

no outgoing calls

Tested by 4

scopedToFunction · 0.72
subjectsOfFunction · 0.72
seedTenantsFunction · 0.72
subjectsOfFunction · 0.72