hash迭代器
2020-12-20 本文已影响0人
闲云野鹤_23dd
遍历hash1 中以3 结尾的元素
遍历hash1 中以c开头的元素,每次读取 6 个元素
遍历hash1 中以b开头的元素,每次读取 3 个元素
127.0.0.1:6379[11]› HSCAN hash1 0 match *3
- "0"
- (empty list or set)
127.0.0.1:6379[11]› HSCAN hash1 0 match c* count 6 - "0"
- "c"
- "C"
- "c1"
- "C1"
- "c2"
- "C2"
127.0.0.1:6379[11]› HSCAN hash1 0 match b* count 3
- "0"
- "b"
- "B"
- "b1"
- "B1"
- "b2"
- "B2"
127.0.0.1:6379[11]›