当前位置:网站首页>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
边栏推荐
- TS 类型体操 之 循环中的键值判断,as 关键字使用
- Jerry's general penetration test - do data transmission with app Communication [article]
- C # create database connection object SQLite database
- Openjudge noi 2.1 1749: Digital Square
- word中把带有某个符号的行全部选中,更改为标题
- Typescript interface properties
- The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
- Risk planning and identification of Oracle project management system
- Google可能在春节后回归中国市场。
- Rust language - receive command line parameter instances
猜你喜欢
软件测试界的三无简历,企业拿什么来招聘你,石沉大海的简历
TypeScript接口与泛型的使用
[online problem processing] how to kill the corresponding process when the MySQL table deadlock is caused by the code
In the era of digital economy, how to ensure security?
QT color is converted to string and uint
How to prevent Association in cross-border e-commerce multi account operations?
[computer skills]
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
成为优秀的TS体操高手 之 TS 类型体操前置知识储备
Simulation of Michelson interferometer based on MATLAB
随机推荐
NiO programming introduction
[cf gym101196-i] waif until dark network maximum flow
qt颜色与字符串、uint相互转换
Summary of Digital IC design written examination questions (I)
TypeScript void 基础类型
杰理之BLE【篇】
CF1036C Classy Numbers 题解
How can word delete English only and keep Chinese or delete Chinese and keep English
Generator Foundation
数字IC设计笔试题汇总(一)
TypeScript 变量作用域
Ble of Jerry [chapter]
Relevant introduction of clip image
When the Jericho development board is powered on, you can open the NRF app with your mobile phone [article]
智能终端设备加密防护的意义和措施
Simple and understandable high-precision addition in C language
[computer skills]
C # display the list control, select the file to obtain the file path and filter the file extension, and RichTextBox displays the data
Methods for JS object to obtain attributes (. And [] methods)
[MySQL learning notes 29] trigger