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

Function writeBatch

packages/sql/sqlite-node/test/SqlEventJournal.test.ts:411–419  ·  view source on GitHub ↗
(entries: ReadonlyArray<EventJournal.Entry>)

Source from the content-addressed store, hash-verified

409 ReadonlyArray<{ readonly entry: EventJournal.Entry; readonly conflicts: ReadonlyArray<EventJournal.Entry> }>
410 > = []
411 const writeBatch = (entries: ReadonlyArray<EventJournal.Entry>) =>
412 journal.writeFromRemote({
413 remoteId: EventJournal.makeRemoteIdUnsafe(),
414 entries: remoteEntries(entries),
415 effect: (batch) =>
416 Effect.sync(() => {
417 batches.push(batch)
418 })
419 })
420 yield* writeBatch([newer, otherEvent, otherKey])
421 yield* writeBatch([older, sameBatch, sameMillis])
422

Callers 1

Calls 3

remoteEntriesFunction · 0.70
pushMethod · 0.65
syncMethod · 0.45

Tested by

no test coverage detected