MCPcopy Create free account
hub / github.com/Effect-TS/effect / void_

Function void_

packages/effect/src/unstable/sql/SqlResolver.ts:279–314  ·  view source on GitHub ↗
(
  options: {
    readonly Request: Req
    readonly execute: (
      requests: Arr.NonEmptyArray<Req["Encoded"]>
    ) => Effect.Effect<ReadonlyArray<_>, E, R>
  }
)

Source from the content-addressed store, hash-verified

277}
278
279const void_ = <Req extends Schema.Constraint, _, E, R>(
280 options: {
281 readonly Request: Req
282 readonly execute: (
283 requests: Arr.NonEmptyArray<Req["Encoded"]>
284 ) => Effect.Effect<ReadonlyArray<_>, E, R>
285 }
286): RequestResolver.RequestResolver<
287 SqlRequest<
288 Req["Type"],
289 void,
290 E | Schema.SchemaError,
291 Req["EncodingServices"] | R
292 >
293> =>
294 RequestResolver.makeGrouped<
295 SqlRequest<
296 Req["Type"],
297 void,
298 E | Schema.SchemaError,
299 Req["EncodingServices"] | R
300 >,
301 SqlClient.TransactionConnection.Service | undefined
302 >({
303 key: transactionKey,
304 resolver: Effect.fnUntraced(function*(entries) {
305 const [inputs] = yield* partitionRequests(entries, options.Request)
306 if (!Arr.isArrayNonEmpty(inputs)) return
307 yield* options.execute(inputs).pipe(
308 Effect.provideContext(entries[0].context)
309 )
310 for (let i = 0; i < entries.length; i++) {
311 entries[i].completeUnsafe(Exit.void)
312 }
313 })
314 })
315
316export {
317 /**

Callers

nothing calls this directly

Calls 3

completeUnsafeMethod · 0.80
pipeMethod · 0.65
executeMethod · 0.45

Tested by

no test coverage detected