redis v0.1.0 Redis
Redis commands for Elixir
Link to this section Summary
Types
Redis key, extracted into separate type to support variadic arguments
Redis pattern
Unix timestamp in seconds
Variadic argument, when argument values count should equals key/0
count in command
Functions
Append a value to a key
Authenticate to the server
Asynchronously rewrite the append-only file
Asynchronously save the dataset to disk
Count set bits in a string
Perform arbitrary bitfield integer operations on strings
Perform bitwise operations between strings
Find first bit set or clear in a string
Remove and get the first element in a list, or block until one is available
Remove and get the last element in a list, or block until one is available
Pop a value from a list, push it to another list and return it; or block until one is available
Remove and return the member with the highest score from one or more sorted sets, or block until one is available
Remove and return the member with the lowest score from one or more sorted sets, or block until one is available
Get the current connection name
Returns the client ID for the current connection
Kill the connection of a client
Get the list of client connections
Stop processing commands from clients for some time
Instruct the server whether to reply to commands
Set the current connection name
Unblock a client blocked in a blocking command from a different connection
Assign new hash slots to receiving node
Return the number of failure reports active for a given node
Return the number of local keys in the specified hash slot
Set hash slots as unbound in receiving node
Forces a replica to perform a manual failover of its master
Remove a node from the nodes table
Return local key names in the specified hash slot
Provides info about Redis Cluster node state
Returns the hash slot of the specified key
Force a node cluster to handshake with another node
Get Cluster config for the node
List replica nodes of the specified master node
Reconfigure a node as a replica of the specified master node
Reset a Redis Cluster node
Forces the node to save cluster state on disk
Set the configuration epoch in a new node
Bind a hash slot to a specific node
List replica nodes of the specified master node
Get array of Cluster slot to node mappings
Get array of Redis command details
Get total number of Redis commands
Extract keys given a full Redis command
Get array of specific Redis command details
Get the value of a configuration parameter
Reset the stats returned by INFO
Rewrite the configuration file with the in memory configuration
Set a configuration parameter to the given value
Return the number of keys in the selected database
Get debugging information about a key
Make the server crash
Decrement the integer value of a key by one
Decrement the integer value of a key by the given number
Delete a key
Discard all commands issued after MULTI
Return a serialized version of the value stored at the specified key
Echo the given string
Execute a Lua script server side
Execute a Lua script server side
Execute all commands issued after MULTI
Determine if a key exists
Set a key’s time to live in seconds
Set the expiration for a key as a UNIX timestamp
Remove all keys from all databases
Remove all keys from the current database
Add one or more geospatial items in the geospatial index represented using a sorted set
Returns the distance between two members of a geospatial index
Returns members of a geospatial index as standard geohash strings
Returns longitude and latitude of members of a geospatial index
Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a point
Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a member
Get the value of a key
Returns the bit value at offset in the string value stored at key
Get a substring of the string stored at a key
Set the string value of a key and return its old value
Delete one or more hash fields
Determine if a hash field exists
Get the value of a hash field
Get all the fields and values in a hash
Increment the integer value of a hash field by the given number
Increment the float value of a hash field by the given amount
Get all the fields in a hash
Get the number of fields in a hash
Get the values of all the given hash fields
Set multiple hash fields to multiple values
Incrementally iterate hash fields and associated values
Set the string value of a hash field
Set the value of a hash field, only if the field does not exist
Get the length of the value of a hash field
Get all the values in a hash
Increment the integer value of a key by one
Increment the integer value of a key by the given amount
Increment the float value of a key by the given amount
Get information and statistics about the server
Find all keys matching the given pattern
Get the UNIX time stamp of the last successful save to disk
Get an element from a list by its index
Insert an element before or after another element in a list
Get the length of a list
Remove and get the first element in a list
Prepend one or multiple values to a list
Prepend a value to a list, only if the list exists
Get a range of elements from a list
Remove elements from a list
Set the value of an element in a list by its index
Trim a list to the specified range
Outputs memory problems report
Show helpful text about the different subcommands
Show allocator internal stats
Ask the allocator to release memory
Show memory usage details
Estimate the memory usage of a key
Get the values of all the given keys
Atomically transfer a key from a Redis instance to another one
Listen for all requests received by the server in real time
Move a key to another database
Set multiple keys to multiple values
Set multiple keys to multiple values, only if none of the keys exist
Mark the start of a transaction block
Inspect the internals of Redis objects
Remove the expiration from a key
Set a key’s time to live in milliseconds
Set the expiration for a key as a UNIX timestamp specified in milliseconds
Adds the specified elements to the specified HyperLogLog
Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s)
Merge N different HyperLogLogs into a single one
Ping the server
Set the value and expiration in milliseconds of a key
Listen for messages published to channels matching the given patterns
Get the time to live for a key in milliseconds
Post a message to a channel
Inspect the state of the Pub/Sub subsystem
Stop listening for messages posted to channels matching the given patterns
Close the connection
Return a random key from the keyspace
Enables read queries for a connection to a cluster replica node
Disables read queries for a connection to a cluster replica node
Rename a key
Rename a key, only if the new key does not exist
Make the server a replica of another instance, or promote it as master
Create a key using the provided serialized value, previously obtained using DUMP
Return the role of the instance in the context of replication
Remove and get the last element in a list
Remove the last element in a list, prepend it to another list and return it
Append one or multiple values to a list
Append a value to a list, only if the list exists
Add one or more members to a set
Synchronously save the dataset to disk
Incrementally iterate the keys space
Get the number of members in a set
Set the debug mode for executed scripts
Check existence of scripts in the script cache
Remove all the scripts from the script cache
Kill the script currently in execution
Load the specified Lua script into the script cache
Subtract multiple sets
Subtract multiple sets and store the resulting set in a key
Change the selected database for the current connection
Set the string value of a key
Sets or clears the bit at offset in the string value stored at key
Set the value and expiration of a key
Set the value of a key, only if the key does not exist
Overwrite part of a string at key starting at the specified offset
Synchronously save the dataset to disk and then shut down the server
Intersect multiple sets
Intersect multiple sets and store the resulting set in a key
Determine if a given value is a member of a set
Make the server a replica of another instance, or promote it as master. Deprecated starting with Redis 5. Use REPLICAOF instead
Manages the Redis slow queries log
Get all the members in a set
Move a member from one set to another
Sort the elements in a list, set or sorted set
Remove and return one or multiple random members from a set
Get one or multiple random members from a set
Remove one or more members from a set
Incrementally iterate Set elements
Get the length of the value stored in a key
Listen for messages published to the given channels
Add multiple sets
Add multiple sets and store the resulting set in a key
Swaps two Redis databases
Internal command used for replication
Return the current server time
Alters the last access time of a key(s). Returns the number of existing keys specified
Get the time to live for a key
Determine the type stored at key
Delete a key asynchronously in another thread. Otherwise it is just as DEL, but non blocking
Stop listening for messages posted to the given channels
Forget about all watched keys
Wait for the synchronous replication of all the write commands sent in the context of the current connection
Watch the given keys to determine execution of the MULTI/EXEC block
Marks a pending message as correctly processed, effectively removing it from the pending entries list of the consumer group. Return value of the command is the number of messages successfully acknowledged, that is, the IDs we were actually able to resolve in the PEL
Appends a new entry to a stream
Changes (or acquires) ownership of a message in a consumer group, as if the message was delivered to the specified consumer
Removes the specified entries from the stream. Returns the number of items actually deleted, that may be different from the number of IDs passed in case certain IDs do not exist
Create, destroy, and manage consumer groups
Get information on streams and consumer groups
Return the number of entires in a stream
Return information and entries from a stream consumer group pending entries list, that are messages fetched but never acknowledged
Return a range of elements in a stream, with IDs matching the specified IDs interval
Return never seen elements in multiple streams, with IDs greater than the ones reported by the caller for each stream. Can block
Return new entries from a stream using a consumer group, or access the history of the pending entries for a given consumer. Can block
Return a range of elements in a stream, with IDs matching the specified IDs interval, in reverse order (from greater to smaller IDs) compared to XRANGE
Trims the stream to (approximately if ‘~’ is passed) a certain size
Add one or more members to a sorted set, or update its score if it already exists
Get the number of members in a sorted set
Count the members in a sorted set with scores within the given values
Increment the score of a member in a sorted set
Intersect multiple sorted sets and store the resulting sorted set in a new key
Count the number of members in a sorted set between a given lexicographical range
Remove and return members with the highest scores in a sorted set
Remove and return members with the lowest scores in a sorted set
Return a range of members in a sorted set, by index
Return a range of members in a sorted set, by lexicographical range
Return a range of members in a sorted set, by score
Determine the index of a member in a sorted set
Remove one or more members from a sorted set
Remove all members in a sorted set between the given lexicographical range
Remove all members in a sorted set within the given indexes
Remove all members in a sorted set within the given scores
Return a range of members in a sorted set, by index, with scores ordered from high to low
Return a range of members in a sorted set, by lexicographical range, ordered from higher to lower strings
Return a range of members in a sorted set, by score, with scores ordered from high to low
Determine the index of a member in a sorted set, with scores ordered from high to low
Incrementally iterate sorted sets elements and associated scores
Get the score associated with the given member in a sorted set
Add multiple sorted sets and store the resulting sorted set in a new key
Link to this section Types
Redis key, extracted into separate type to support variadic arguments
Redis pattern
Unix timestamp in seconds
Variadic argument, when argument values count should equals key/0
count in command
Link to this section Functions
Append a value to a key
Group: string
.
Authenticate to the server
Group: connection
.
Asynchronously rewrite the append-only file
Group: server
.
Asynchronously save the dataset to disk
Group: server
.
Count set bits in a string
Group: string
.
Perform arbitrary bitfield integer operations on strings
Group: string
.
Perform bitwise operations between strings
Group: string
.
Find first bit set or clear in a string
Group: string
.
Remove and get the first element in a list, or block until one is available
Group: list
.
Remove and get the last element in a list, or block until one is available
Group: list
.
Pop a value from a list, push it to another list and return it; or block until one is available
Group: list
.
Remove and return the member with the highest score from one or more sorted sets, or block until one is available
Group: sorted_set
.
Remove and return the member with the lowest score from one or more sorted sets, or block until one is available
Group: sorted_set
.
Get the current connection name
Group: server
.
Returns the client ID for the current connection
Group: server
.
Kill the connection of a client
Group: server
.
client_list(opts :: [{:type, :normal | :master | :replica | :pubsub}]) :: iolist()
Get the list of client connections
Group: server
.
Stop processing commands from clients for some time
Group: server
.
client_reply(reply_mode :: :on | :off | :skip) :: iolist()
Instruct the server whether to reply to commands
Group: server
.
Set the current connection name
Group: server
.
Unblock a client blocked in a blocking command from a different connection
Group: server
.
Assign new hash slots to receiving node
Group: cluster
.
Return the number of failure reports active for a given node
Group: cluster
.
Return the number of local keys in the specified hash slot
Group: cluster
.
Set hash slots as unbound in receiving node
Group: cluster
.
cluster_failover( opts :: [(:force | :takeover) | {:options, :force | :takeover}] ) :: iolist()
Forces a replica to perform a manual failover of its master.
Group: cluster
.
Remove a node from the nodes table
Group: cluster
.
Return local key names in the specified hash slot
Group: cluster
.
Provides info about Redis Cluster node state
Group: cluster
.
Returns the hash slot of the specified key
Group: cluster
.
Force a node cluster to handshake with another node
Group: cluster
.
Get Cluster config for the node
Group: cluster
.
List replica nodes of the specified master node
Group: cluster
.
Reconfigure a node as a replica of the specified master node
Group: cluster
.
cluster_reset(opts :: [(:hard | :soft) | {:reset_type, :hard | :soft}]) :: iolist()
Reset a Redis Cluster node
Group: cluster
.
Forces the node to save cluster state on disk
Group: cluster
.
Set the configuration epoch in a new node
Group: cluster
.
Bind a hash slot to a specific node
Group: cluster
.
List replica nodes of the specified master node
Group: cluster
.
Get array of Cluster slot to node mappings
Group: cluster
.
Get array of Redis command details
Group: server
.
Get total number of Redis commands
Group: server
.
Extract keys given a full Redis command
Group: server
.
Get array of specific Redis command details
Group: server
.
Get the value of a configuration parameter
Group: server
.
Reset the stats returned by INFO
Group: server
.
Rewrite the configuration file with the in memory configuration
Group: server
.
Set a configuration parameter to the given value
Group: server
.
Return the number of keys in the selected database
Group: server
.
Get debugging information about a key
Group: server
.
Make the server crash
Group: server
.
Decrement the integer value of a key by one
Group: string
.
Decrement the integer value of a key by the given number
Group: string
.
Delete a key
Group: generic
.
Discard all commands issued after MULTI
Group: transactions
.
Return a serialized version of the value stored at the specified key.
Group: generic
.
Echo the given string
Group: connection
.
Execute a Lua script server side
Group: scripting
.
Execute a Lua script server side
Group: scripting
.
Execute all commands issued after MULTI
Group: transactions
.
Determine if a key exists
Group: generic
.
Set a key’s time to live in seconds
Group: generic
.
expireat(key :: key(), timestamp :: posix_time()) :: iolist()
Set the expiration for a key as a UNIX timestamp
Group: generic
.
Remove all keys from all databases
Group: server
.
Remove all keys from the current database
Group: server
.
Add one or more geospatial items in the geospatial index represented using a sorted set
Group: geo
.
Returns the distance between two members of a geospatial index
Group: geo
.
Returns members of a geospatial index as standard geohash strings
Group: geo
.
Returns longitude and latitude of members of a geospatial index
Group: geo
.
Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a point
Group: geo
.
Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a member
Group: geo
.
Get the value of a key
Group: string
.
Returns the bit value at offset in the string value stored at key
Group: string
.
Get a substring of the string stored at a key
Group: string
.
Set the string value of a key and return its old value
Group: string
.
Delete one or more hash fields
Group: hash
.
Determine if a hash field exists
Group: hash
.
Get the value of a hash field
Group: hash
.
Get all the fields and values in a hash
Group: hash
.
Increment the integer value of a hash field by the given number
Group: hash
.
Increment the float value of a hash field by the given amount
Group: hash
.
Get all the fields in a hash
Group: hash
.
Get the number of fields in a hash
Group: hash
.
Get the values of all the given hash fields
Group: hash
.
Set multiple hash fields to multiple values
Group: hash
.
Incrementally iterate hash fields and associated values
Group: hash
.
Set the string value of a hash field
Group: hash
.
Set the value of a hash field, only if the field does not exist
Group: hash
.
Get the length of the value of a hash field
Group: hash
.
Get all the values in a hash
Group: hash
.
Increment the integer value of a key by one
Group: string
.
Increment the integer value of a key by the given amount
Group: string
.
Increment the float value of a key by the given amount
Group: string
.
Get information and statistics about the server
Group: server
.
Find all keys matching the given pattern
Group: generic
.
Get the UNIX time stamp of the last successful save to disk
Group: server
.
Get an element from a list by its index
Group: list
.
Insert an element before or after another element in a list
Group: list
.
Get the length of a list
Group: list
.
Remove and get the first element in a list
Group: list
.
Prepend one or multiple values to a list
Group: list
.
Prepend a value to a list, only if the list exists
Group: list
.
Get a range of elements from a list
Group: list
.
Remove elements from a list
Group: list
.
Set the value of an element in a list by its index
Group: list
.
Trim a list to the specified range
Group: list
.
Outputs memory problems report
Group: server
.
Show helpful text about the different subcommands
Group: server
.
Show allocator internal stats
Group: server
.
Ask the allocator to release memory
Group: server
.
Show memory usage details
Group: server
.
Estimate the memory usage of a key
Group: server
.
Get the values of all the given keys
Group: string
.
Atomically transfer a key from a Redis instance to another one.
Group: generic
.
Listen for all requests received by the server in real time
Group: server
.
Move a key to another database
Group: generic
.
Set multiple keys to multiple values
Group: string
.
Set multiple keys to multiple values, only if none of the keys exist
Group: string
.
Mark the start of a transaction block
Group: transactions
.
Inspect the internals of Redis objects
Group: generic
.
Remove the expiration from a key
Group: generic
.
Set a key’s time to live in milliseconds
Group: generic
.
pexpireat(key :: key(), milliseconds_timestamp :: posix_time()) :: iolist()
Set the expiration for a key as a UNIX timestamp specified in milliseconds
Group: generic
.
Adds the specified elements to the specified HyperLogLog.
Group: hyperloglog
.
Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s).
Group: hyperloglog
.
Merge N different HyperLogLogs into a single one.
Group: hyperloglog
.
Ping the server
Group: connection
.
Set the value and expiration in milliseconds of a key
Group: string
.
Listen for messages published to channels matching the given patterns
Group: pubsub
.
Get the time to live for a key in milliseconds
Group: generic
.
Post a message to a channel
Group: pubsub
.
Inspect the state of the Pub/Sub subsystem
Group: pubsub
.
Stop listening for messages posted to channels matching the given patterns
Group: pubsub
.
Close the connection
Group: connection
.
Return a random key from the keyspace
Group: generic
.
Enables read queries for a connection to a cluster replica node
Group: cluster
.
Disables read queries for a connection to a cluster replica node
Group: cluster
.
Rename a key
Group: generic
.
Rename a key, only if the new key does not exist
Group: generic
.
Make the server a replica of another instance, or promote it as master.
Group: server
.
Create a key using the provided serialized value, previously obtained using DUMP.
Group: generic
.
Return the role of the instance in the context of replication
Group: server
.
Remove and get the last element in a list
Group: list
.
Remove the last element in a list, prepend it to another list and return it
Group: list
.
Append one or multiple values to a list
Group: list
.
Append a value to a list, only if the list exists
Group: list
.
Add one or more members to a set
Group: set
.
Synchronously save the dataset to disk
Group: server
.
Incrementally iterate the keys space
Group: generic
.
Get the number of members in a set
Group: set
.
script_debug(mode :: :yes | :sync | :no) :: iolist()
Set the debug mode for executed scripts.
Group: scripting
.
Check existence of scripts in the script cache.
Group: scripting
.
Remove all the scripts from the script cache.
Group: scripting
.
Kill the script currently in execution.
Group: scripting
.
Load the specified Lua script into the script cache.
Group: scripting
.
Subtract multiple sets
Group: set
.
Subtract multiple sets and store the resulting set in a key
Group: set
.
Change the selected database for the current connection
Group: connection
.
Set the string value of a key
Group: string
.
Sets or clears the bit at offset in the string value stored at key
Group: string
.
Set the value and expiration of a key
Group: string
.
Set the value of a key, only if the key does not exist
Group: string
.
Overwrite part of a string at key starting at the specified offset
Group: string
.
shutdown(opts :: [(:nosave | :save) | {:save_mode, :nosave | :save}]) :: iolist()
Synchronously save the dataset to disk and then shut down the server
Group: server
.
Intersect multiple sets
Group: set
.
Intersect multiple sets and store the resulting set in a key
Group: set
.
Determine if a given value is a member of a set
Group: set
.
Make the server a replica of another instance, or promote it as master. Deprecated starting with Redis 5. Use REPLICAOF instead.
Group: server
.
Manages the Redis slow queries log
Group: server
.
Get all the members in a set
Group: set
.
Move a member from one set to another
Group: set
.
Sort the elements in a list, set or sorted set
Group: generic
.
Remove and return one or multiple random members from a set
Group: set
.
Get one or multiple random members from a set
Group: set
.
Remove one or more members from a set
Group: set
.
Incrementally iterate Set elements
Group: set
.
Get the length of the value stored in a key
Group: string
.
Listen for messages published to the given channels
Group: pubsub
.
Add multiple sets
Group: set
.
Add multiple sets and store the resulting set in a key
Group: set
.
Swaps two Redis databases
Group: connection
.
Internal command used for replication
Group: server
.
Return the current server time
Group: server
.
Alters the last access time of a key(s). Returns the number of existing keys specified.
Group: generic
.
Get the time to live for a key
Group: generic
.
Determine the type stored at key
Group: generic
.
Delete a key asynchronously in another thread. Otherwise it is just as DEL, but non blocking.
Group: generic
.
Stop listening for messages posted to the given channels
Group: pubsub
.
Forget about all watched keys
Group: transactions
.
Wait for the synchronous replication of all the write commands sent in the context of the current connection
Group: generic
.
Watch the given keys to determine execution of the MULTI/EXEC block
Group: transactions
.
Marks a pending message as correctly processed, effectively removing it from the pending entries list of the consumer group. Return value of the command is the number of messages successfully acknowledged, that is, the IDs we were actually able to resolve in the PEL.
Group: stream
.
Appends a new entry to a stream
Group: stream
.
Changes (or acquires) ownership of a message in a consumer group, as if the message was delivered to the specified consumer.
Group: stream
.
Removes the specified entries from the stream. Returns the number of items actually deleted, that may be different from the number of IDs passed in case certain IDs do not exist.
Group: stream
.
Create, destroy, and manage consumer groups.
Group: stream
.
Get information on streams and consumer groups
Group: stream
.
Return the number of entires in a stream
Group: stream
.
Return information and entries from a stream consumer group pending entries list, that are messages fetched but never acknowledged.
Group: stream
.
Return a range of elements in a stream, with IDs matching the specified IDs interval
Group: stream
.
Return never seen elements in multiple streams, with IDs greater than the ones reported by the caller for each stream. Can block.
Group: stream
.
Return new entries from a stream using a consumer group, or access the history of the pending entries for a given consumer. Can block.
Group: stream
.
Return a range of elements in a stream, with IDs matching the specified IDs interval, in reverse order (from greater to smaller IDs) compared to XRANGE
Group: stream
.
Trims the stream to (approximately if ‘~’ is passed) a certain size
Group: stream
.
Add one or more members to a sorted set, or update its score if it already exists
Group: sorted_set
.
Get the number of members in a sorted set
Group: sorted_set
.
Count the members in a sorted set with scores within the given values
Group: sorted_set
.
Increment the score of a member in a sorted set
Group: sorted_set
.
Intersect multiple sorted sets and store the resulting sorted set in a new key
Group: sorted_set
.
Count the number of members in a sorted set between a given lexicographical range
Group: sorted_set
.
Remove and return members with the highest scores in a sorted set
Group: sorted_set
.
Remove and return members with the lowest scores in a sorted set
Group: sorted_set
.
Return a range of members in a sorted set, by index
Group: sorted_set
.
Return a range of members in a sorted set, by lexicographical range
Group: sorted_set
.
Return a range of members in a sorted set, by score
Group: sorted_set
.
Determine the index of a member in a sorted set
Group: sorted_set
.
Remove one or more members from a sorted set
Group: sorted_set
.
Remove all members in a sorted set between the given lexicographical range
Group: sorted_set
.
Remove all members in a sorted set within the given indexes
Group: sorted_set
.
Remove all members in a sorted set within the given scores
Group: sorted_set
.
Return a range of members in a sorted set, by index, with scores ordered from high to low
Group: sorted_set
.
Return a range of members in a sorted set, by lexicographical range, ordered from higher to lower strings.
Group: sorted_set
.
Return a range of members in a sorted set, by score, with scores ordered from high to low
Group: sorted_set
.
Determine the index of a member in a sorted set, with scores ordered from high to low
Group: sorted_set
.
Incrementally iterate sorted sets elements and associated scores
Group: sorted_set
.
Get the score associated with the given member in a sorted set
Group: sorted_set
.
Add multiple sorted sets and store the resulting sorted set in a new key
Group: sorted_set
.