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

Function cmdHINCRBY

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

Source from the content-addressed store, hash-verified

126
127 return dataMap, nil
128}
129
130func cmdHINCRBY(m uhaha.Machine, args []string) (interface{}, error) {
131 if len(args) != 4 {
132 return nil, uhaha.ErrWrongNumArgs
133 }
134
135 delta, err := ledis.StrInt64([]byte(args[3]), nil)
136 if err != nil {
137 return nil, err
138 }
139
140 n, err := ldb.HIncrBy([]byte(args[1]), []byte(args[2]), delta)
141 if err != nil {
142 return nil, err
143 }
144 return redcon.SimpleInt(n), nil
145}
146

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected