The Redis HKEYS
command returns all fields in the hash stored at the specified key.
Tag: commands
Redis HDEL Command
In Redis, the HDEL
command enables us to delete one or more fields in a hash. It deletes the specified field/s at the specified key.
If the field doesn’t exist, it’s ignored. If the key doesn’t exist, it’s treated as an empty hash and 0
is returned.
Redis HSETNX Command
In Redis, the HSETNX
command enables us to set a field in a hash, but only if the field doesn’t already exist. It sets the field at the specified key to the value we provide.
If the key doesn’t exist, it’s created with the specified hash value. If the field already exists, nothing is set (i.e. the command has no effect).
Continue readingRedis HSET Command
In Redis, the HSET
command enables us to set one or more fields in a hash. It sets the field/s at the specified key to the value/s we provide.
If the key doesn’t exist, it’s created with the specified hash value. If the field already exists, it is overwritten with the new value.
Continue reading14 Commands that Set Strings in Redis
I thought I’d compile a list of Redis commands that can be used to set strings. Each command has its own specific use, and so the command used will depend on the situation.
In any case, here are 14 commands that set strings in Redis.
Continue reading7 Commands that Get the String Value from a Key in Redis
I decided to compile a list of commands that can be used to get the string value from a key in Redis. These are all string commands – commands that can be used when working with strings. In other words, the assumption is that the key holds a string value.
Continue readingRedis SUNIONSTORE Command Explained
In Redis, the SUNIONSTORE
command does the same thing that SUNION
does, except that it stores the result in a key. More specifically, it takes the members of the set resulting from the union of all of the given sets, and stores them in the specified key.
Redis SUNION Command Explained
In Redis, the SUNION
command returns the members of the set resulting from the union of all of the given sets.
Redis SREM Command Explained
In Redis, the SREM
command allows us to remove one or more members from a set.
Redis SRANDMEMBER Command Explained
In Redis, the SRANDMEMBER
command returns one or more random members from the set value store at the specified key.
If you want to remove the random member/s from the set, use the SPOP
command.