summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/getdel.md
blob: 8474e93105e72a4c01898a4d857d42ac52a58c10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Get the value of `key` and delete the key.
This command is similar to `GET`, except for the fact that it also deletes the key on success (if and only if the key's value type is a string).

@return

@bulk-string-reply: the value of `key`, `nil` when `key` does not exist, or an error if the key's value type isn't a string.

@examples

```cli
SET mykey "Hello"
GETDEL mykey
GET mykey
```