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

Function patchDocs

packages/infra/src/ClusterCosmos.ts:468–480  ·  view source on GitHub ↗
(
    docs: ReadonlyArray<A>,
    resourceBody: (doc: A) => PatchRequestBody
  )

Source from the content-addressed store, hash-verified

466 )
467
468 const patchDocs = <A extends { readonly id: string; readonly _partitionKey: string }>(
469 docs: ReadonlyArray<A>,
470 resourceBody: (doc: A) => PatchRequestBody
471 ): Effect.Effect<void, unknown, never> =>
472 batchDocs(
473 docs,
474 (doc) => ({
475 operationType: "Patch" as const,
476 id: doc.id,
477 resourceBody: resourceBody(doc)
478 }),
479 (doc) => patchDoc(doc, resourceBody(doc))
480 )
481
482 const deleteDoc = <A extends { readonly id: string; readonly _partitionKey: string }>(
483 doc: A

Callers 1

ClusterCosmos.tsFile · 0.85

Calls 2

batchDocsFunction · 0.85
patchDocFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…