| 1761 | } |
| 1762 | |
| 1763 | int migrateGetKeys(struct redisCommand *cmd, robj **argv, int argc, getKeysResult *result) { |
| 1764 | int i, num, first, *keys; |
| 1765 | UNUSED(cmd); |
| 1766 | |
| 1767 | /* Assume the obvious form. */ |
| 1768 | first = 3; |
| 1769 | num = 1; |
| 1770 | |
| 1771 | /* But check for the extended one with the KEYS option. */ |
| 1772 | if (argc > 6) { |
| 1773 | for (i = 6; i < argc; i++) { |
| 1774 | if (!strcasecmp(argv[i]->ptr,"keys") && |
| 1775 | sdslen(argv[3]->ptr) == 0) |
| 1776 | { |
| 1777 | first = i+1; |
| 1778 | num = argc-first; |
| 1779 | break; |
| 1780 | } |
| 1781 | } |
| 1782 | } |
| 1783 | |
| 1784 | keys = getKeysPrepareResult(result, num); |
| 1785 | for (i = 0; i < num; i++) keys[i] = first+i; |
| 1786 | result->numkeys = num; |
| 1787 | return num; |
| 1788 | } |
| 1789 | |
| 1790 | /* Helper function to extract keys from following commands: |
| 1791 | * GEORADIUS key x y radius unit [WITHDIST] [WITHHASH] [WITHCOORD] [ASC|DESC] |
nothing calls this directly
no test coverage detected