This article is a mirror article of machine translation, please click here to jump to the original article.

View: 26014|Reply: 1

[Redis] Redis Hash Hash Hash Value Problem

[Copy link]
Posted on 12/30/2015 10:42:40 AM | | |
Redis hash is a mapping table of fields and values of type String, which is particularly suitable for storing objects.
Each hash in Redis can store 232 - 1 key-value pairs (over 4 billion).


In the above example, we set some description information (name, descrip{filter}tion, likes, visitors) of redis to the w3ckey of the hash table.

Redis hash command
The following table lists the basic related commands for redis hash:
serial numberCommand and description
1HDEL key field2 [field2]
Delete one or more hash table fields
2HEXISTS key field
Check the hash table key for the specified field.
3HGET key field
Gets the value /td > stored in the specified field in the hash table
4HGETALL key
Get all the fields and values that specify the key in the hash table
5HINCRBY key field increment
Add an increment to the integer value of the specified field in the hash table key.
6HINCRBYFLOAT key field increment
Add an increment to the floating-point value of the specified field in the hash table key.
7HKEYS key
Get the fields in all hash tables
8HLEN key
Get the number of fields in the hash table
9HMGET key field1 [field2]
Get the values for all given fields
10HMSET key field1 value1 [field2 value2 ]
Set multiple field-value pairs to the hash table key at the same time.
11HSET key field value
Set the value of the field in the hash table key to value.
12HSETNX key field value
Set the value of the hash table field only if the field field does not exist.
13HVALS key
Get all the values in the hash table
14HSCAN key cursor [MATCH pattern] [COUNT count]
Key-value pairs in the iteration hash table.





Previous:Redis queries the type of key and queries according to the type of key
Next:Image image is set in the WPF background
Posted on 9/22/2021 8:16:27 PM |
Learn to learn...
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com