MCPcopy Create free account
hub / github.com/F-Stack/f-stack / getKeysFromCommand

Function getKeysFromCommand

app/redis-6.2.6/src/db.c:1649–1657  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1647 * This function uses the command table if a command-specific helper function
1648 * is not required, otherwise it calls the command-specific function. */
1649int 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. */
1660void getKeysFreeResult(getKeysResult *result) {

Callers 5

trackingRememberKeysFunction · 0.85
commandCommandFunction · 0.85
getNodeByQueryFunction · 0.85
ACLCheckCommandPermFunction · 0.85
RM_GetCommandKeysFunction · 0.85

Calls 2

getKeysUsingCommandTableFunction · 0.85

Tested by

no test coverage detected