In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is about what the redis data types are. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.
There are five types of redis data:
string string (can be integer, float, and string, collectively called element)
list (implement queue, elements are not unique, first-in first-out principle)
set (different elements)
hash value (hash key must be unique)
sort set
2. Common commands of string type:
Add: incr
Self-reduction: decr
Add: incrby
Less: Decrby
Common commands supported by list type:
lpush: Push from the left
lpop: pop up from the right
push: push from right
rpop: pop up from the right
llen: View the length of a list data type
4. Common commands supported by set type:
sadd: add data
scard: View the number of elements present in the set data
sismember: Determine whether an element exists in the set data
srem: Delete elements from a set of data
5. Common commands supported by hash data type:
hset: Add hash data
hget: Get hash data
hmget: Get multiple hash data
6, sort set and hash is very similar, but also the form of mapping storage:
zadd: add
zcard: query
zrange: Sort data
Thank you for reading! This article on "What are the data types of redis" is shared here. I hope the above content can be of some help to everyone so that everyone can learn more knowledge. If you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.