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
| 2196 | * This function uses the command table if a command-specific helper function |
| 2197 | * is not required, otherwise it calls the command-specific function. */ |
| 2198 | int getKeysFromCommand(struct redisCommand *cmd, robj **argv, int argc, getKeysResult *result) { |
| 2199 | if (cmd->flags & CMD_MODULE_GETKEYS) { |
| 2200 | return moduleGetCommandKeysViaAPI(cmd,argv,argc,result); |
| 2201 | } else if (!(cmd->flags & CMD_MODULE) && cmd->getkeys_proc) { |
| 2202 | return cmd->getkeys_proc(cmd,argv,argc,result); |
| 2203 | } else { |
| 2204 | return getKeysUsingCommandTable(cmd,argv,argc,result); |
| 2205 | } |
| 2206 | } |
| 2207 | |
| 2208 | /* Free the result of getKeysFromCommand. */ |
| 2209 | void getKeysFreeResult(getKeysResult *result) { |
no test coverage detected