MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / upsert

Method upsert

projects/runtime-client/src/cache.ts:41–46  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

39 }
40
41 upsert(value: unknown): RuntimeRecord | null {
42 const runtime = validateRuntimeRecord(value)
43 if (!runtime.ok) return null
44 this.records.set(runtime.value.runtimeId, runtime.value)
45 return runtime.value
46 }
47
48 replace(records: Iterable<unknown>, filter: RuntimeRecordCacheFilter = {}): RuntimeRecord[] {
49 if (Object.keys(filter).length > 0) {

Callers 3

replaceMethod · 0.95
applyNotificationMethod · 0.95
cache.test.tsFile · 0.45

Calls 2

validateRuntimeRecordFunction · 0.90
setMethod · 0.65

Tested by

no test coverage detected