redis hash

redis> hset myhash username test age 34 sex male
(integer) 3
redis>
redis>
redis> hget myhash username
"test"
redis> hget myhash age
"34"
redis> hget myhash sex
"male"
redis> hexists myhash address
(integer) 0
redis> hexists myhash age
(integer) 1
redis> hlen myset
(integer) 0
redis>
redis>
redis> hlen myhash
(integer) 3
redis> hgetall myhash
1) "username"
2) "test"
3) "age"
4) "34"
5) "sex"
6) "male"
redis>
redis>
redis> hgetall myhash
1) "username"
2) "test"
3) "age"
4) "34"
5) "sex"
6) "male"
redis>
redis> hset myhash username test age 34 sex male
(integer) 0
redis>
redis> hset myhash username test age 34 sex male1
(integer) 0
redis>
redis> hset myhash username test age 34 sex male1
(integer) 0
redis>

    A+
发布日期:2018年11月30日  所属分类:未分类

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: