MCPcopy Create free account
hub / github.com/HDT3213/rdb / WriteHashMapObjectEx

Method WriteHashMapObjectEx

core/hash.go:337–353  ·  view source on GitHub ↗
(key string, hash map[string][]byte, expire map[string]int64, options ...interface{})

Source from the content-addressed store, hash-verified

335}
336
337func (enc *Encoder) WriteHashMapObjectEx(key string, hash map[string][]byte, expire map[string]int64, options ...interface{}) error {
338 err := enc.beforeWriteObject(options...)
339 if err != nil {
340 return err
341 }
342
343 if enc.valkey {
344 err = enc.writeHash2Encoding(key, hash, expire, options...)
345 } else {
346 err = enc.writeHashEncodingEx(key, hash, expire, options...)
347 }
348 if err != nil {
349 return err
350 }
351 enc.state = writtenObjectState
352 return nil
353}
354
355func (enc *Encoder) writeHashEncoding(key string, hash map[string][]byte, options ...interface{}) error {
356 err := enc.write([]byte{typeHash})

Callers

nothing calls this directly

Calls 3

beforeWriteObjectMethod · 0.95
writeHash2EncodingMethod · 0.95
writeHashEncodingExMethod · 0.95

Tested by

no test coverage detected