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

Function cmdHMCLEAR

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

Source from the content-addressed store, hash-verified

274 }
275 return redcon.SimpleInt(n), nil
276}
277
278func cmdHMCLEAR(m uhaha.Machine, args []string) (interface{}, error) {
279 if len(args) < 2 {
280 return nil, uhaha.ErrWrongNumArgs
281 }
282
283 keys := make([][]byte, len(args)-1)
284 for i := 1; i < len(args); i++ {
285 keys[i-1] = []byte(args[i])
286 }
287 n, err := ldb.HMclear(keys...)
288 if err != nil {
289 return nil, err
290 }
291 return redcon.SimpleInt(n), nil
292}
293

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected