MCPcopy Index your code
hub / github.com/HDT3213/rdb / WriteHashMapObject

Method WriteHashMapObject

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

Source from the content-addressed store, hash-verified

316}
317
318func (enc *Encoder) WriteHashMapObject(key string, hash map[string][]byte, options ...interface{}) error {
319 err := enc.beforeWriteObject(options...)
320 if err != nil {
321 return err
322 }
323 ok, err := enc.tryWriteZipListHashMap(key, hash, options...)
324 if err != nil {
325 return err
326 }
327 if !ok {
328 err = enc.writeHashEncoding(key, hash, options...)
329 if err != nil {
330 return err
331 }
332 }
333 enc.state = writtenObjectState
334 return nil
335}
336
337func (enc *Encoder) WriteHashMapObjectEx(key string, hash map[string][]byte, expire map[string]int64, options ...interface{}) error {
338 err := enc.beforeWriteObject(options...)

Callers 2

mainFunction · 0.95
TestHashEncodingFunction · 0.80

Calls 3

beforeWriteObjectMethod · 0.95
writeHashEncodingMethod · 0.95

Tested by 1

TestHashEncodingFunction · 0.64