MCPcopy
hub / github.com/wavetermdev/waveterm / ContextAddUpdate

Function ContextAddUpdate

pkg/waveobj/ctxupdate.go:74–85  ·  view source on GitHub ↗
(ctx context.Context, update WaveObjUpdate)

Source from the content-addressed store, hash-verified

72}
73
74func ContextAddUpdate(ctx context.Context, update WaveObjUpdate) {
75 updatesVal := ctx.Value(waveObjUpdateKey)
76 if updatesVal == nil {
77 return
78 }
79 updates := updatesVal.(*contextUpdatesType)
80 oref := ORef{
81 OType: update.OType,
82 OID: update.OID,
83 }
84 updates.UpdatesStack[len(updates.UpdatesStack)-1][oref] = update
85}
86
87func ContextUpdatesBeginTx(ctx context.Context) context.Context {
88 updatesVal := ctx.Value(waveObjUpdateKey)

Callers 3

DBDeleteFunction · 0.92
DBUpdateFunction · 0.92
DBInsertFunction · 0.92

Calls 1

ValueMethod · 0.80

Tested by

no test coverage detected