| 739 | } |
| 740 | |
| 741 | void lmoveHandlePush(client *c, robj *dstkey, robj *dstobj, robj *value, |
| 742 | int where) { |
| 743 | /* Create the list if the key does not exist */ |
| 744 | if (!dstobj) { |
| 745 | dstobj = createQuicklistObject(); |
| 746 | quicklistSetOptions((quicklist*)ptrFromObj(dstobj), g_pserver->list_max_ziplist_size, |
| 747 | g_pserver->list_compress_depth); |
| 748 | dbAdd(c->db,dstkey,dstobj); |
| 749 | } |
| 750 | signalModifiedKey(c,c->db,dstkey); |
| 751 | listTypePush(dstobj,value,where); |
| 752 | notifyKeyspaceEvent(NOTIFY_LIST, |
| 753 | where == LIST_HEAD ? "lpush" : "rpush", |
| 754 | dstkey, |
| 755 | c->db->id); |
| 756 | /* Always send the pushed value to the client. */ |
| 757 | addReplyBulk(c,value); |
| 758 | } |
| 759 | |
| 760 | int getListPositionFromObjectOrReply(client *c, robj *arg, int *position) { |
| 761 | if (strcasecmp(szFromObj(arg),"right") == 0) { |
no test coverage detected