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

Function rebind

packages/core/sdk/src/fuma-runtime.ts:356–357  ·  view source on GitHub ↗
(handle: FumaDb)

Source from the content-addressed store, hash-verified

354
355export const makeFumaClient = (db: FumaDb, options: MakeFumaClientOptions = {}): IFumaClient => {
356 const rebind = (handle: FumaDb): FumaDb =>
357 options.context === undefined ? handle : withQueryContext(handle, options.context);
358 const use: IFumaClient["use"] = (label, fn) =>
359 Effect.flatMap(Effect.service(activeFumaDbRef), (active) =>
360 fumaEffect(label, () => fn(makeSafeFumaQuery(rebind(active ?? db), options))),

Callers 1

useFunction · 0.85

Calls 1

withQueryContextFunction · 0.90

Tested by

no test coverage detected