MCPcopy Create free account
hub / github.com/effect-app/libs / saveAllWithEffectInt

Function saveAllWithEffectInt

packages/effect-app/src/Model/Repository/ext.ts:85–94  ·  view source on GitHub ↗
(
    gen: Effect.Effect<readonly [Iterable<P>, Iterable<Evt>, A], E, R>
  )

Source from the content-addressed store, hash-verified

83 }
84
85 function saveAllWithEffectInt<
86 P extends T,
87 R,
88 E,
89 A
90 >(
91 gen: Effect.Effect<readonly [Iterable<P>, Iterable<Evt>, A], E, R>
92 ): Effect.Effect<
93 A,
94 E | InvalidStateError | OptimisticConcurrencyException | DatabaseError,
95 R | RSchema | RPublish
96 > {
97 return Effect.flatMap(gen, ([items, events, a]) => repo.saveAndPublish(items, events).pipe(Effect.map(() => a)))

Callers 5

saveManyWithPure_Function · 0.85
saveWithPure_Function · 0.85
saveManyWithPureBatched_Function · 0.85
saveManyWithPureFunction · 0.85
extendRepoFunction · 0.85

Calls 2

pipeMethod · 0.65
mapMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…