DUMP keyname * DUMP is actually not used by Redis Cluster but it is the obvious * complement of RESTORE and can be useful for different applications. */
| 5095 | * DUMP is actually not used by Redis Cluster but it is the obvious |
| 5096 | * complement of RESTORE and can be useful for different applications. */ |
| 5097 | void dumpCommand(client *c) { |
| 5098 | robj *o; |
| 5099 | rio payload; |
| 5100 | |
| 5101 | /* Check if the key is here. */ |
| 5102 | if ((o = lookupKeyRead(c->db,c->argv[1])) == NULL) { |
| 5103 | addReplyNull(c); |
| 5104 | return; |
| 5105 | } |
| 5106 | |
| 5107 | /* Create the DUMP encoded representation. */ |
| 5108 | createDumpPayload(&payload,o,c->argv[1]); |
| 5109 | |
| 5110 | /* Transfer to the client */ |
| 5111 | addReplyBulkSds(c,payload.io.buffer.ptr); |
| 5112 | return; |
| 5113 | } |
| 5114 | |
| 5115 | /* RESTORE key ttl serialized-value [REPLACE] */ |
| 5116 | void restoreCommand(client *c) { |
nothing calls this directly
no test coverage detected