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

Function cmdZREM

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected