MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / Put

Method Put

driver/ipfs/write_batch.go:14–23  ·  view source on GitHub ↗
(key, value []byte)

Source from the content-addressed store, hash-verified

12}
13
14func (w *WriteBatch) Put(key, value []byte) {
15 buf := bytes.NewBuffer(value)
16 cid, err := w.db.remoteShell.Add(buf)
17 if err != nil {
18 w.err = err
19 return
20 }
21 w.wbatch.Put(key, []byte(cid))
22 w.db.cache.Del(key)
23}
24
25func (w *WriteBatch) Delete(key []byte) {
26 w.wbatch.Delete(key)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected