()
| 218 | } |
| 219 | |
| 220 | func (item *Item) prefetchValue() { |
| 221 | val, cb, err := item.yieldItemValue() |
| 222 | defer runCallback(cb) |
| 223 | |
| 224 | item.err = err |
| 225 | item.status = prefetched |
| 226 | if val == nil { |
| 227 | return |
| 228 | } |
| 229 | if item.db.opt.ValueLogLoadingMode == options.MemoryMap { |
| 230 | buf := item.slice.Resize(len(val)) |
| 231 | copy(buf, val) |
| 232 | item.val = buf |
| 233 | } else { |
| 234 | item.val = val |
| 235 | } |
| 236 | } |
| 237 | |
| 238 | // EstimatedSize returns the approximate size of the key-value pair. |
| 239 | // |
no test coverage detected