1
1
mirror of https://github.com/namibia/awesome-cheatsheets.git synced 2024-11-24 21:57:38 +00:00

Merge pull request #195 from Devorein/redis-lpushx

Added redis lpushx command
This commit is contained in:
Julien Le Coupanec 2021-05-08 00:37:04 +02:00 committed by GitHub
commit 5afbb2dd0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,8 +42,9 @@ TTL key # returns the number of seconds until a key is
RPUSH key value [value ...] # put the new value at the end of the list RPUSH key value [value ...] # put the new value at the end of the list
RPUSHX key value # append a value to a list, only if the exists RPUSHX key value # append a value at the end of the list, only if it exists
LPUSH key value [value ...] # put the new value at the start of the list LPUSH key value [value ...] # put the new value at the start of the list
LPUSHX key value # append a value at the start of the list, only if it exists
LRANGE key start stop # give a subset of the list LRANGE key start stop # give a subset of the list
LINDEX key index # get an element from a list by its index LINDEX key index # get an element from a list by its index
LINSERT key BEFORE|AFTER pivot value # insert an element before or after another element in a list LINSERT key BEFORE|AFTER pivot value # insert an element before or after another element in a list