Return all the arguments that are keys in the command passed via argc / argv. * * The command returns the positions of all the key arguments inside the array, * so the actual return value is a heap allocated array of integers. The * length of the array is returned by reference into *numkeys. * * 'cmd' must be point to the corresponding entry into the redisCommand * table, according to the c
| 1647 | * This function uses the command table if a command-specific helper function |
| 1648 | * is not required, otherwise it calls the command-specific function. */ |
| 1649 | int getKeysFromCommand(struct redisCommand *cmd, robj **argv, int argc, getKeysResult *result) { |
| 1650 | if (cmd->flags & CMD_MODULE_GETKEYS) { |
| 1651 | return moduleGetCommandKeysViaAPI(cmd,argv,argc,result); |
| 1652 | } else if (!(cmd->flags & CMD_MODULE) && cmd->getkeys_proc) { |
| 1653 | return cmd->getkeys_proc(cmd,argv,argc,result); |
| 1654 | } else { |
| 1655 | return getKeysUsingCommandTable(cmd,argv,argc,result); |
| 1656 | } |
| 1657 | } |
| 1658 | |
| 1659 | /* Free the result of getKeysFromCommand. */ |
| 1660 | void getKeysFreeResult(getKeysResult *result) { |
no test coverage detected