hrm
HRM
Apply for Redis Developer Course
|
Redis Regular Inspection / Technical Support
|
Redis Enterprise Server
|
|---|
Delete fields and values by a field-name pattern
The usage is hrm key field*.
You can use a glob-style pattern for Field.
- * : Matches any characters: h*llo -> hllo, heeeello, etc
- ? : Matches one character: h?llo -> hallo, hello, hxllo, etc
- [alphabet] : Matches a character in the brackets: h[ae]llo -> hallo, hello
- [^e] : Matches any character except those in the brackets:
h[^e]llo -> hallo, hbllo, ... but hello is excluded.
- [a-c] : Matches a character range in the brackets: h[a-c]llo -> hallo, hbllo, hcllo
- \ : To use the special characters above (*?[^]) as literals, prefix them with \.
Example
| Command> | hset myhash field1 value1 field2 value2 |
| Result> | 4 |
| Command> | hrm myhash field1* |
| Result> | 2 |
| Command> | hls myhash * |
| Result> |
1) field2 2) value2 |
Syntax
HRM key field-pattern
- Available since Enterprise version 6.1.0.
- Time complexity is O(N). N is the number of data items.
| << HDEL | ZRM | HGET >> |
|---|
Email
답글이 올라오면 이메일로 알려드리겠습니다.
