(key []byte)
| 53 | w.ipfsOps = append(w.ipfsOps, func() error { |
| 54 | return w.db.ipfsDB.Put(w.db.ctx, metaKey, versionBytes) |
| 55 | }) |
| 56 | |
| 57 | w.db.cache.Del(key) |
| 58 | } |
| 59 | |
| 60 | func (w *WriteBatch) Delete(key []byte) { |
| 61 | if w.err != nil { |
| 62 | return |
| 63 | } |
| 64 | metaKey := append([]byte("_meta:"), key...) |
| 65 | |
| 66 | // Add local delete to the leveldb batch |
| 67 | w.wbatch.Delete(key) |
| 68 | w.wbatch.Delete(metaKey) |
| 69 | |
| 70 | // Add IPFS delete to the pre-commit queue |
| 71 | w.ipfsOps = append(w.ipfsOps, func() error { |
| 72 | return w.db.ipfsDB.Delete(w.db.ctx, key) |
| 73 | }) |
| 74 | w.ipfsOps = append(w.ipfsOps, func() error { |
| 75 | return w.db.ipfsDB.Delete(w.db.ctx, metaKey) |
| 76 | }) |
| 77 |
nothing calls this directly
no outgoing calls
no test coverage detected