| 641 | *----------------------------------------------------------------------------*/ |
| 642 | |
| 643 | void hsetnxCommand(client *c) { |
| 644 | robj *o; |
| 645 | if ((o = hashTypeLookupWriteOrCreate(c,c->argv[1])) == NULL) return; |
| 646 | hashTypeTryConversion(o,c->argv,2,3); |
| 647 | |
| 648 | if (hashTypeExists(o, c->argv[2]->ptr)) { |
| 649 | addReply(c, shared.czero); |
| 650 | } else { |
| 651 | hashTypeSet(o,c->argv[2]->ptr,c->argv[3]->ptr,HASH_SET_COPY); |
| 652 | addReply(c, shared.cone); |
| 653 | signalModifiedKey(c,c->db,c->argv[1]); |
| 654 | notifyKeyspaceEvent(NOTIFY_HASH,"hset",c->argv[1],c->db->id); |
| 655 | server.dirty++; |
| 656 | } |
| 657 | } |
| 658 | |
| 659 | void hsetCommand(client *c) { |
| 660 | int i, created = 0; |
nothing calls this directly
no test coverage detected