语法:hmset key field value [field value …] 示例:
127.0.0.1:6379> hmset myhash k1 val1 k2 val2
OK
127.0.0.1:6379> hmget myhash k1 k2
1) "val1"
2) "val2"
语法:hmget key field [field …] 示例:
127.0.0.1:6379> hmget myhash k1 k2
1) "v1"
2) "v2"
语法:hkeys key 示例:
127.0.0.1:6379> hkeys myhash
1) "key1"
2) "key2"
语法:hvals key 示例:
127.0.0.1:6379> hvals myhash
1) "value1"
2) "value2"
语法:hgetall key 示例:
127.0.0.1:6379> hgetall myhash
1) "k1"
2) "v1"
3) "k2"
4) "v2"
语法:hincrbyfloat key field increment 示例:
127.0.0.1:6379> hincrbyfloat myhash k3 2.2
"9.2"
语法:hexists key field 示例:
127.0.0.1:6379> hexists myhash key1
(integer) 1
语法:hlen key 示例:
127.0.0.1:6379> hlen myhash
(integer) 2
© 2019 - 2023 Liangliang Lee. Powered by gin and hexo-theme-book.