(target, prop)
| 72 | { internal: context === undefined ? internal : { ...internal, context } }, |
| 73 | { |
| 74 | get(target, prop) { |
| 75 | if (prop === "internal") return target.internal; |
| 76 | if (prop === "withContext") { |
| 77 | return (nextContext: ExecutorOwnerPolicyContext) => makeDb(nextContext); |
| 78 | } |
| 79 | if (!queryMethods.has(prop)) return undefined; |
| 80 | |
| 81 | return async (...args: unknown[]) => { |
| 82 | const actual = await start(); |
| 83 | const actualDb = |
| 84 | context === undefined ? actual.db : withQueryContext(actual.db, context); |
| 85 | const method = Reflect.get(actualDb, prop) as (...innerArgs: unknown[]) => unknown; |
| 86 | return method.apply(actualDb, args); |
| 87 | }; |
| 88 | }, |
| 89 | }, |
| 90 | ) as FumaDb; |
| 91 |
nothing calls this directly
no test coverage detected