标签:Hash 哈希 Redis value field key
Redis十大关系之哈希Hash:Map<String, Map<Object, Object>>
HSET key field value field value...:设置属性值
![image-20240220102510925](https://cdn.jsdelivr.net/gh/mitu-me/blog-img/image-20240220102510925.png)
HGET key field: 获取对应属性值
![image-20240220102625021](https://cdn.jsdelivr.net/gh/mitu-me/blog-img/image-20240220102625021.png)
HGETALL key:遍历哈希
![image-20240220102859439](https://cdn.jsdelivr.net/gh/mitu-me/blog-img/image-20240220102859439.png)
HDEL key field:删除field对应的属性
![image-20240220103012774](https://cdn.jsdelivr.net/gh/mitu-me/blog-img/image-20240220103012774.png)
HLEN key:获取某个key内的全部数量
![image-20240220103150612](https://cdn.jsdelivr.net/gh/mitu-me/blog-img/image-20240220103150612.png)
HEXISTS key field:判断key中有没有field字段,存在返回1,不存在返回0
![image-20240220103251932](https://cdn.jsdelivr.net/gh/mitu-me/blog-img/image-20240220103251932.png)
HKEYS key和KVALS key分别罗列出对应的key和value
![image-20240220103443169](https://cdn.jsdelivr.net/gh/mitu-me/blog-img/image-20240220103443169.png)
标签:Hash,
哈希,
Redis,
value,
field,
key
From: https://www.cnblogs.com/lilyflower/p/18022556