The Redis PSETEX
command sets a key to hold a given string value, and sets that key to time out after a given number of milliseconds.
Redis SETEX Command Explained
In Redis, the SETEX
command sets a key to hold a given string value, and sets that key to time out after a given number of seconds.
Redis APPEND Command Explained
In Redis, the APPEND
command appends a given value to the end of the value of a specified key.
If the key doesn’t exist, APPEND
creates the key with the empty string and appends the value to it (so it basically works like the SET
command in this case).
How to Get the First Day of the Month in Oracle
Here’s an example of returning the first day of a given month in Oracle Database. We can return the first day of the current month, a previous or later month, or the first day of a month based on a specified date.
Continue readingRedis GETDEL Command Explained
The Redis GETDEL
command gets the value of a given key, then deletes that key. It’s similar to the GET
command, except that it deletes the key on success (the GET
command doesn’t delete the key – it only returns its value).
An error is returned if the value stored at key
is not a string.
The GETDEL
command was introduced in Redis 6.2.0.
Redis DEL Command Explained
In Redis, the DEL
command removes one or more keys. If a specified key doesn’t exist, it’s ignored.
Redis LCS Command Explained
In Redis, the LCS
command implements the longest common subsequence algorithm.
The longest common subsequence algorithm finds the longest subsequence common to all sequences in a set of sequences. Note that this is different to the longest common string algorithm (also known as the longest common substring algorithm), which requires that matching characters in the string are contiguous. The longest common subsequence algorithm, on the other hand, doesn’t require matching characters to be contiguous.
The LCS command was introduced in Redis 7.0.0.
Continue readingRedis GETEX Command Explained
The Redis GETEX
command enables us to get the value of a key, then set the key’s expiration. We can also use it to remove any existing expiration associated with the key.
How NVL2() Works in MariaDB
In MariaDB, the NVL2()
function allows us to replace a value with another value, the new value being determined by whether or not the initial value is null.
It’s similar to the NVL()
function, except that NVL2()
accepts three arguments instead of two. This allows us to specify a different value to return in the event the first argument is not null.
2 Ways to Check your Redis Client Version
Here are two quick and easy options to find out what version of the Redis client (redis-cli
) you’re using.