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

Function cmdHDEL

hashes.go:74–90  ·  view source on GitHub ↗

HDEL key field [field ...]

(m uhaha.Machine, args []string)

Source from the content-addressed store, hash-verified

72 return val, nil
73}
74
75// HDEL key field [field ...]
76func cmdHDEL(m uhaha.Machine, args []string) (interface{}, error) {
77 if len(args) < 3 {
78 return nil, uhaha.ErrWrongNumArgs
79 }
80
81 var n int64
82 argsData := make([][]byte, len(args)-2)
83 for i := 2; i < len(args); i++ {
84 argsData[i-2] = []byte(args[i])
85 }
86
87 if count, err := ldb.HDel([]byte(args[1]), argsData...); err == nil {
88 n = count
89 }
90
91 return redcon.SimpleInt(n), nil
92}
93

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected