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

Function cmdHGETALL

hashes.go:110–126  ·  view source on GitHub ↗
(m uhaha.Machine, args []string)

Source from the content-addressed store, hash-verified

108
109 return redcon.SimpleInt(n), nil
110}
111
112func cmdHGETALL(m uhaha.Machine, args []string) (interface{}, error) {
113 if len(args) != 2 {
114 return nil, uhaha.ErrWrongNumArgs
115 }
116
117 v, err := ldb.HGetAll([]byte(args[1]))
118 if err != nil {
119 return nil, err
120 }
121
122 dataMap := make(map[string]string)
123 for _, kv := range v {
124 dataMap[string(kv.Field)] = string(kv.Value)
125 }
126
127 return dataMap, nil
128}
129

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected