(handle: FumaDb)
| 354 | |
| 355 | export 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))), |
no test coverage detected