博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
redis 哈希里存哈希_如何使用Redis哈希
阅读量:2507 次
发布时间:2019-05-11

本文共 767 字,大约阅读时间需要 2 分钟。

redis 哈希里存哈希

So far with Lists and Sets we saw how to correlate a key with a value, or a group of values.

到目前为止,我们已经通过列表和集合了解了如何将键与一个值或一组值相关联。

Hashes let us associate more than one value to a single key, and they are perfect to store object-like items.

哈希使我们可以将多个值关联到单个键,并且它们非常适合存储类似对象的项。

For example, a person has a name and an age.

例如,一个人有名字和年龄。

We can create a person:1 hash:

我们可以创建一个person:1哈希:

HMSET person:1 name "Flavio" age 37

To get all the properties of a user, use HGETALL:

要获取用户的所有属性,请使用HGETALL

HGETALL person:1

You can update a hash property using HSET:

您可以使用HSET更新哈希属性:

HSET person:1 age 38

You can increment a value stored in a hash using HINCRBY:

您可以使用HINCRBY增加存储在哈希中的值:

HINCRBY person:1 age 2

See all the hash commands .

查看所有哈希命令。

翻译自:

redis 哈希里存哈希

转载地址:http://zxmgb.baihongyu.com/

你可能感兴趣的文章
nodejs创建服务器
查看>>
安卓 图片加载框架ImageLoader
查看>>
ApplicationBar
查看>>
Spring Boot Docker 实战
查看>>
Div Vertical Menu ver3
查看>>
Git简明操作
查看>>
InnoDB为什么要使用auto_Increment
查看>>
课堂练习之买书打折最便宜
查看>>
定义函数
查看>>
网络虚拟化技术(二): TUN/TAP MACVLAN MACVTAP
查看>>
MQTT协议笔记之mqtt.io项目HTTP协议支持
查看>>
(转)jQuery中append(),prepend()与after(),before()的区别
查看>>
Tecplot: Legend和图像中 Dashed/Dash dot/Long dash 等虚线显示没有区别的问题
查看>>
Python读取mysql数据,转为DataFrame格式并根据原TABLE中的COLUMNS指定columns,index
查看>>
简单版用户登录
查看>>
hdu 1250(大整数)
查看>>
hdu 1518(DFS+剪枝)
查看>>
win8 开发之旅(2) --连连看游戏开发 项目错误的总结
查看>>
视频转换工具ffmpeg
查看>>
一、 object c -基础学习第一天 如何定义一个类
查看>>