当前位置:网站首页>Hash of redis command
Hash of redis command
2022-06-25 18:14:00 【[email protected]】
List of articles
1. hset
hset hash field value
: Sets the value for the specified field in the hash
- If the given field does not exist in the hash , Then this setting is a creation operation , The command will associate the given field and value in the hash , Then return
- If the given field already exists in the hash , This setting is an update operation , The command will overwrite the old value of the field with the new value given by the user , Then return 0
Storage in the database :
Add NX Options : You can set only when the field does not exist
2. hget
hget hash field
: Get the value of the specified field in the hash
3. hincrby
hincrby hash field increment
: If the hash field stores information that can be used by Redis Numbers interpreted as integers , Then users can use HINCRBY The command adds the specified integer increment to the value of the field If you want to subtract , Only need to increment Set to a negative number
- Field must be an integer
- The increment must also be an integer
4. hincrbyfloat
hincrbyfloat hash field increment
Fields can be integers or floating point numbers , The increment can also be an integer or a floating point number
If you want to subtract , Only need to increment Set to a negative number
5. hstrlen
hstrlen hash filed
: Gets the byte length of the given field value
6. hexists
hexists hash field
: Check whether the field given by the user exists in the hash , There is returned 1, Otherwise return to 0
7. hdel
hdel hash field
: Deletes the specified field and its associated value in the hash
Delete successful return 1;
Delete failed return 0( Hash does not exist or filed non-existent )
8. hlen
hlen hash
: Gets the number of fields contained in a given hash
Hash if not present , that HLEN The command will return 0 As a result
9. hmset
hmset hash field1 value1 field value2...
: Set values for multiple fields in the hash at once
If the field given by the user already exists in the hash , that HMSET The command will overwrite the existing old value of the field with the new value given by the user
10. hmget
hmget hash field1 field2...
: Get the values of multiple fields from the hash at once
Returns when the field does not exist or the hash does not exist nil
11. hkeys
hkeys hash
: Get all the fields in the hash
12. hvals
hvals hash
: Get the values of all fields in the hash
13. hgetall
hgetall hash
: Get all fields and values
版权声明
本文为[[email protected]]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202190532337449.html
边栏推荐
- 什么是算子?
- Slam visuel Leçon 14 leçon 9 filtre Kalman
- Qt使用SQLITE数据库
- Deeply understand and grasp the basic characteristics of digital economy
- Find the longest substring length satisfying the condition
- Android物联网应用程序开发(智慧园区)—— 图片预览界面
- C语言中%含义
- Handling method of qstring containing "\u0000" in QT
- How to develop the hash quiz game system? Hash quiz game system development application details case and source code
- 十大券商的排名是?手机开户安全么?
猜你喜欢
About Equilibrium - Simplified bottleneck model
SDN system method | 9 Access network
ASP. Net supermarket convenience store online shopping mall source code, for the surrounding distribution system
Unity technical manual - size over lifetime and size by speed
Slam visuel Leçon 14 leçon 9 filtre Kalman
HMS core machine learning service realizes simultaneous interpretation, supports Chinese-English translation and multiple voice broadcast
【日常记录】——对BigDecimal除法运算时遇到的Bug
使用DiskGenius拓展系统盘C盘的容量
Acy100 oil fume concentration online monitor for kitchen oil fume emission in catering industry
[tips] how to quickly start a new position for a new software testing engineer
随机推荐
Deep learning network model
1、对范数的理解
Unity technical manual - interference / noise sub module
TLV decoding
SDN system method | 10 The future of SDN
The Stackies 2022:32个营销技术栈入选
JSP page running but displaying source code
The performance of the server's four channel memory is improved. How about the performance of the four channel memory
解决nvprof 报错ERR_NVGPUCTRPERM - The user does not have permission to profile on the target device.
A simple and easy-to-use graph visualization tool developed recently
What is an operator?
【 NLP 】 in this year's English college entrance examination, CMU delivered 134 high scores with reconstruction pre training, significantly surpassing gpt3
观察者模式之通用消息发布与订阅
How to delay the delay function
How to open a stock account? Is it safe to open a securities account
ACY100油烟浓度在线监控仪针对饮食业厨房油烟排放
Chapter 4:win10 installing mingw64
There is a repeating element iii[pruning with ordered ordering]
【日常记录】——对BigDecimal除法运算时遇到的Bug
Introduction to microservices