HEXISTS key field
(m uhaha.Machine, args []string)
| 91 | return redcon.SimpleInt(n), nil |
| 92 | } |
| 93 | |
| 94 | // HEXISTS key field |
| 95 | func cmdHEXISTS(m uhaha.Machine, args []string) (interface{}, error) { |
| 96 | if len(args) != 3 { |
| 97 | return nil, uhaha.ErrWrongNumArgs |
| 98 | } |
| 99 | |
| 100 | var n int64 = 1 |
| 101 | v, err := ldb.HGet([]byte(args[1]), []byte(args[2])) |
| 102 | if err != nil { |
| 103 | return nil, err |
| 104 | } |
| 105 | if v == nil { |
| 106 | n = 0 |
| 107 | } |
| 108 | |
| 109 | return redcon.SimpleInt(n), nil |
| 110 | } |
| 111 |
nothing calls this directly
no outgoing calls
no test coverage detected