From e1828cbe2c8ab660ded8de4f6b4b836679f43d57 Mon Sep 17 00:00:00 2001 From: Safwan Shaheer Date: Fri, 30 Apr 2021 20:33:24 +0600 Subject: [PATCH] Added redis lpushx command --- databases/redis.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/databases/redis.sh b/databases/redis.sh index 58a1185..a52f6c7 100644 --- a/databases/redis.sh +++ b/databases/redis.sh @@ -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 -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 +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 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