当前位置:网站首页>Redis set structure command
Redis set structure command
2022-07-25 09:33:00 【yu-yuan】
Set features :
1 . Disorder 2 . Uniqueness 3 . deterministic
| Add to collection ( Existing values will not enter the set ) | sadd key value ..... |
| Look at all the elements in the collection | smembers k vey |
| Delete elements from the collection | srem key value |
| Randomly select an element in the set and delete it after returning | spop key |
| Randomly extract an element without deleting | srandmember key |
| Check whether there is this element in the collection | sismember key value |
| See how many elements there are in this collection | scard |
| from set1 Move value To set2 | smore set1 set2 value |
| In multiple sets value Intersection | sinter set1 set2 ...... |
| In multiple sets value Union | sunion set1 set2 set3 |
| In multiple sets value The difference between the set | sdiff set1 set2 set3 |
| The intersection of multiple sets is stored in another set | sinterstore key set1 set2 set3 |
Ordered set (order set)
| Add to ordered collection | zadd key score1 value1 score2 value2 |
View the elements in the ordered collection ( Sort query ) withscores( At the same time, find out store) | zrange key start shop withscores( Don't write ) |
| Take value by identification (score) Inquire about (num) Take a few | zrangebyscore key min max After add limit offset num |
| Query out value In the set score Which place is it | zrank key value ( Ascending ) zrevrange key value ( Descending ) |
Delete that element in the collection Conditions term1~term2 Between Elements Delete | zrem key value1 value2..... zremrangebyscore key term1 term2 |
| Statistics set The number of elements in | zcard key |
| Statistics set in term1~term2 Between the elements | zcount key term1 term2 |
| Operations between multiple sets | zinterstore set3 num( identification ) set1 set2 aggregate sum/min/max |
| Merge two sets And find the intersection | zinterstore set3 num( identification ) set1 set2 withscores |
边栏推荐
- [GKCTF 2021]easynode
- How to configure SSH after changing the computer
- C language and SQL Server database technology
- Browser access to swagger failed with error err_ UNSAFE_ PORT
- Redis string 结构命令
- Indexes, views and transactions of MySQL
- ~5 ccf 2021-12-2 序列查询新解
- 变量名可以用中文?直接把人干蒙了
- How to write Android switching interface with kotlin
- OC--Foundation--集合
猜你喜欢

OC--Foundation--集合

@4-1 CCF 2020-06-1 线性分类器

Browser access to swagger failed with error err_ UNSAFE_ PORT

*7-2 CCF 2015-09-2 日期计算

无法再web服务器上启动调试,web服务器未能找到请求资源

作业7.15 shell脚本
![[HCTF 2018]admin](/img/d7/f0155c72d3fbddf0a8c1796a179a0f.png)
[HCTF 2018]admin

A brief introduction to the interest of convolutional neural networks

Swagger2显示get接口有问题,加注解就能解决

~2 ccf 2022-03-1 未初始化警告
随机推荐
[GYCTF2020]Ez_ Express
Week小结
换电脑后如何配置SSH
Machine learning -- detailed introduction of standardscaler (), transform (), fit () in sklearn package
[GPLT] 2022 大众情人(floyd)
Data query language (DQL)
深入解读C语言随机数函数和如何实现随机数
[WSN communication] optimize HWSN energy-saving clustering protocol based on MATLAB biogeography [including Matlab source code, 1989]
Click to hide the column in wechat applet, and then click to show it
OverTheWire-Natas
*7-1 CCF 2015-09-1 数列分段
[HCTF 2018]admin
[HCTF 2018]admin
【代码源】每日一题 简单字段和
【代码源】每日一题 国家铁路
Go foundation 2
What are stand-alone, cluster and distributed?
Reverse Integer
Floating point number exploration
Prim 最小生成树(图解)