当前位置:网站首页>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
边栏推荐
- Typescript variable scope
- 杰理之BLE【篇】
- word中如何删除某符号前面或后面所有的文字
- Compliance and efficiency, accelerate the digital transformation of pharmaceutical enterprises, and create a new document resource center for pharmaceutical enterprises
- How to estimate the number of threads
- Comparison of usage scenarios and implementations of extensions, equal, and like in TS type Gymnastics
- Linked list interview questions (Graphic explanation)
- TypeScript 函数定义
- 烧录场景下的源代码防泄密方案分享
- 洛谷P4127 [AHOI2009]同类分布 题解
猜你喜欢

杰理之BLE【篇】

Opencv learning notes 9 -- background modeling + optical flow estimation

烧录场景下的源代码防泄密方案分享

How MySQL merges data

How to delete all the words before or after a symbol in word

opencv学习笔记八--答题卡识别
![[cf gym101196-i] waif until dark network maximum flow](/img/66/6b339fc23146b5fbdcd2a1fa0a2349.png)
[cf gym101196-i] waif until dark network maximum flow

opencv学习笔记九--背景建模+光流估计

【Redis】NoSQL数据库和redis简介

Significance and measures of encryption protection for intelligent terminal equipment
随机推荐
word中如何删除某符号前面或后面所有的文字
Word setting directory
杰理之AD 系列 MIDI 功能说明【篇】
OpenJudge NOI 2.1 1661:Bomb Game
Ble of Jerry [chapter]
Jerry's ad series MIDI function description [chapter]
超级浏览器是指纹浏览器吗?怎样选择一款好的超级浏览器?
Typescript interface properties
软件测试界的三无简历,企业拿什么来招聘你,石沉大海的简历
[1. Delphi foundation] 1 Introduction to Delphi Programming
When the Jericho development board is powered on, you can open the NRF app with your mobile phone [article]
Get/post/put/patch/delete meaning
opencv学习笔记九--背景建模+光流估计
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
TypeScript void 基础类型
TS 类型体操 之 循环中的键值判断,as 关键字使用
Cf1036c class numbers solution
【MySQL学习笔记32】mvcc
成为优秀的TS体操高手 之 TS 类型体操前置知识储备
智能终端设备加密防护的意义和措施