| 2310 | } |
| 2311 | |
| 2312 | int migrateGetKeys(struct redisCommand *cmd, robj **argv, int argc, getKeysResult *result) { |
| 2313 | int i, num, first, *keys; |
| 2314 | UNUSED(cmd); |
| 2315 | |
| 2316 | /* Assume the obvious form. */ |
| 2317 | first = 3; |
| 2318 | num = 1; |
| 2319 | |
| 2320 | /* But check for the extended one with the KEYS option. */ |
| 2321 | if (argc > 6) { |
| 2322 | for (i = 6; i < argc; i++) { |
| 2323 | if (!strcasecmp(szFromObj(argv[i]),"keys") && |
| 2324 | sdslen(szFromObj(argv[3])) == 0) |
| 2325 | { |
| 2326 | first = i+1; |
| 2327 | num = argc-first; |
| 2328 | break; |
| 2329 | } |
| 2330 | } |
| 2331 | } |
| 2332 | |
| 2333 | keys = getKeysPrepareResult(result, num); |
| 2334 | for (i = 0; i < num; i++) keys[i] = first+i; |
| 2335 | result->numkeys = num; |
| 2336 | return num; |
| 2337 | } |
| 2338 | |
| 2339 | /* Helper function to extract keys from following commands: |
| 2340 | * GEORADIUS key x y radius unit [WITHDIST] [WITHHASH] [WITHCOORD] [ASC|DESC] |
nothing calls this directly
no test coverage detected