当前位置:网站首页>Redis list detailed explanation of character types yyds dry goods inventory
Redis list detailed explanation of character types yyds dry goods inventory
2022-07-06 07:39:00 【Jiangxiaolong's technology blog】
Redis list list Detailed explanation of character types
1. List type common instructions
command | meaning | usage |
---|---|---|
LPUSH | Insert data at the beginning | lpush key value |
RPUSH | Insert data at the end | rpush key value |
LPOP | Delete starting data | lpop key |
RPOP | Delete end data | rpop key |
LRANGE | see key data | lrange key 0 -1 |
2. In the list key Middle write data
A list of key It can contain multiple pieces of data , list key It is similar to a database table , There are multiple pieces of data in it
In the list key There are two commands for writing data in ,RPUSH and LPUSH
rpush Means to write from the right , It can be understood as writing data from the end to the inside
lpush Means to write from the left , It can be understood as writing data from the beginning to the inside
Grammar format :LPUSH key value
RPUSH key value
3. Delete list key One of the data in
Delete key Data from LPOP and RPOP name
LPOP The command starts at the beginning and deletes , Grammar format :LPOP key
RPOP The command starts at the end and deletes , Grammar format :RPOP key
4. view list key The data of
redis list key The first one is 0, The second is 1
Grammar format :lrange key From the first few lines To which line
边栏推荐
- GET/POST/PUT/PATCH/DELETE含义
- Word delete the contents in brackets
- 【mysql学习笔记29】触发器
- The difference between TS Gymnastics (cross operation) and interface inheritance
- Select all the lines with a symbol in word and change them to titles
- After the hot update of uniapp, "mismatched versions may cause application exceptions" causes and Solutions
- Related operations of Excel
- 【MySQL学习笔记32】mvcc
- 学go之路(二)基本类型及变量、常量
- Solution: intelligent site intelligent inspection scheme video monitoring system
猜你喜欢
Simulation of Michelson interferometer based on MATLAB
Force buckle day31
Key value judgment in the cycle of TS type gymnastics, as keyword use
Simulation of holographic interferogram and phase reconstruction of Fourier transform based on MATLAB
Apache middleware vulnerability recurrence
TS 类型体操 之 循环中的键值判断,as 关键字使用
[online problem processing] how to kill the corresponding process when the MySQL table deadlock is caused by the code
opencv学习笔记九--背景建模+光流估计
[非线性控制理论]9_非线性控制理论串讲
[cf gym101196-i] waif until dark network maximum flow
随机推荐
合规、高效,加快药企数字化转型,全新打造药企文档资源中心
位运算异或
(lightoj - 1410) consistent verbs (thinking)
Iterator Foundation
opencv学习笔记八--答题卡识别
How MySQL merges data
TypeScript 可索引类型
GET/POST/PUT/PATCH/DELETE含义
Méthode d'obtention des propriétés de l'objet JS (.Et [] méthodes)
洛谷P4127 [AHOI2009]同类分布 题解
Leecode-c language implementation -15 Sum of three ----- ideas to be improved
软件测试界的三无简历,企业拿什么来招聘你,石沉大海的简历
http缓存,强制缓存,协商缓存
Typescript interface and the use of generics
js對象獲取屬性的方法(.和[]方式)
Oracle column to row -- a field is converted to multiple rows according to the specified separator
js对象获取属性的方法(.和[]方式)
Full Score composition generator: living on code
C # create database connection object SQLite database
NiO programming introduction