hash 是一个 string 类型的 field(字段) 和 value(值) 的映射表,hash 特别适合用于存储对象,map集合
hset car name bmhset car price 500hmset car name bm price 500 一次多条数据hexists car price 判断字段是否存在 存在返回1 键不存在也返回0 car是键hsetnx car id 456 赋值,id存在将不会改变值
hget car name 查询1条hmget car name price 多条hgetall car 获取全部键值
hincrby car id 1 增加数字可以是任何正负数,返回数字hincrbyfloat map age 1.5 增加浮点hdel car id 删除字段,支持多个返回删除个数hkeys car 获取键的字段名hvals car 获取值hlen car 返回字段数量
作者:Yoby 创建时间:2020-07-22 23:18
更新时间:2024-12-05 13:26
更新时间:2024-12-05 13:26