summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/exists.md
blob: a9a89afbad8c48284120f3001427c321cf4cab5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Returns if `key` exists.

The user should be aware that if the same existing key is mentioned in the arguments multiple times, it will be counted multiple times. So if `somekey` exists, `EXISTS somekey somekey` will return 2.

@return

@integer-reply, specifically the number of keys that exist from those specified as arguments.

@examples

```cli
SET key1 "Hello"
EXISTS key1
EXISTS nosuchkey
SET key2 "World"
EXISTS key1 key2 nosuchkey
```