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. */
| 5185 | * DUMP is actually not used by Redis Cluster but it is the obvious |
| 5186 | * complement of RESTORE and can be useful for different applications. */ |
| 5187 | void dumpCommand(client *c) { |
| 5188 | robj_roptr o; |
| 5189 | rio payload; |
| 5190 | |
| 5191 | /* Check if the key is here. */ |
| 5192 | if ((o = lookupKeyRead(c->db,c->argv[1])) == nullptr) { |
| 5193 | addReplyNull(c); |
| 5194 | return; |
| 5195 | } |
| 5196 | |
| 5197 | /* Create the DUMP encoded representation. */ |
| 5198 | createDumpPayload(&payload,o,c->argv[1]); |
| 5199 | |
| 5200 | /* Transfer to the client */ |
| 5201 | addReplyBulkSds(c,payload.io.buffer.ptr); |
| 5202 | return; |
| 5203 | } |
| 5204 | |
| 5205 | /* KEYDB.MVCCRESTORE key mvcc expire serialized-value */ |
| 5206 | void mvccrestoreCommand(client *c) { |
nothing calls this directly
no test coverage detected