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

Function saveAllE

packages/effect-app/src/Model/Repository/internal/internal.ts:244–256  ·  view source on GitHub ↗
(a: Iterable<Encoded>)

Source from the content-addressed store, hash-verified

242 }
243 const recordEntityRead = (id: T[IdKey]) => DataDependencies.read(entityDependency([id]))
244 const recordEntityWrite = (ids: NonEmptyReadonlyArray<T[IdKey]>) =>
245 DataDependencies.write(entityDependency(ids))
246 const recordItemWrite = (items: NonEmptyReadonlyArray<T>) =>
247 Effect.forEach(
248 DataDependencies.merge(new Set(items.flatMap(itemDependencies))),
249 DataDependencies.write,
250 { discard: true }
251 )
252 const cms = Effect.map(getContextMap.pipe(Effect.orDie), (_) => ({
253 get: (id: string) => _.get(`${name}.${id}`),
254 set: (id: string, etag: string | undefined) => _.set(`${name}.${id}`, etag)
255 }))
256
257 const pub = "publishEvents" in args
258 ? args.publishEvents
259 : () => Effect.void

Callers 1

makeFunction · 0.85

Calls 7

flatMapOptionFunction · 0.90
mapToPersistenceModelFunction · 0.85
syncMethod · 0.80
pipeMethod · 0.65
mapMethod · 0.65
forEachMethod · 0.65
setFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…