EXISTS key1 key2 ... key_N. * Return value is the number of keys existing. */
| 915 | /* EXISTS key1 key2 ... key_N. |
| 916 | * Return value is the number of keys existing. */ |
| 917 | void existsCommand(client *c) { |
| 918 | long long count = 0; |
| 919 | int j; |
| 920 | |
| 921 | for (j = 1; j < c->argc; j++) { |
| 922 | if (lookupKeyReadWithFlags(c->db,c->argv[j],LOOKUP_NOTOUCH)) count++; |
| 923 | } |
| 924 | addReplyLongLong(c,count); |
| 925 | } |
| 926 | |
| 927 | void mexistsCommand(client *c) { |
| 928 | addReplyArrayLen(c, c->argc - 1); |
nothing calls this directly
no test coverage detected