UNPKG

@conpago/ioredis-mock

Version:

This library emulates ioredis by performing all operations in-memory.

1 lines 161 kB
["pfcount",["summary","Returns the approximated cardinality of the set(s) observed by the HyperLogLog key(s).","since","2.8.9","group","hyperloglog","complexity","O(1) with a very small average constant time when called with a single key. O(N) with N being the number of keys, and much bigger constant times, when called with multiple keys.","arguments",[["name","key","type","key","display_text","key","key_spec_index",0,"flags",["multiple"]]]],"substr",["summary","Returns a substring from a string value.","since","1.0.0","group","string","complexity","O(N) where N is the length of the returned string. The complexity is ultimately determined by the returned length, but because creating a substring from an existing string is very cheap, it can be considered O(1) for small strings.","doc_flags",["deprecated"],"deprecated_since","2.0.0","replaced_by","`GETRANGE`","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","start","type","integer","display_text","start"],["name","end","type","integer","display_text","end"]]],"watch",["summary","Monitors changes to keys to determine the execution of a transaction.","since","2.2.0","group","transactions","complexity","O(1) for every key.","arguments",[["name","key","type","key","display_text","key","key_spec_index",0,"flags",["multiple"]]]],"readwrite",["summary","Enables read-write queries for a connection to a Reids Cluster replica node.","since","3.0.0","group","cluster","complexity","O(1)"],"del",["summary","Deletes one or more keys.","since","1.0.0","group","generic","complexity","O(N) where N is the number of keys that will be removed. When a key to remove holds a value other than a string, the individual complexity for this key is O(M) where M is the number of elements in the list, set, sorted set or hash. Removing a single key that holds a string value is O(1).","arguments",[["name","key","type","key","display_text","key","key_spec_index",0,"flags",["multiple"]]]],"zscan",["summary","Iterates over members and scores of a sorted set.","since","2.8.0","group","sorted-set","complexity","O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection.","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","cursor","type","integer","display_text","cursor"],["name","pattern","type","pattern","display_text","pattern","token","MATCH","flags",["optional"]],["name","count","type","integer","display_text","count","token","COUNT","flags",["optional"]]]],"incrbyfloat",["summary","Increment the floating point value of a key by a number. Uses 0 as initial value if the key doesn't exist.","since","2.6.0","group","string","complexity","O(1)","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","increment","type","double","display_text","increment"]]],"hdel",["summary","Deletes one or more fields and their values from a hash. Deletes the hash if no fields remain.","since","2.0.0","group","hash","complexity","O(N) where N is the number of fields to be removed.","history",[["2.4.0","Accepts multiple `field` arguments."]],"arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","field","type","string","display_text","field","flags",["multiple"]]]],"getset",["summary","Returns the previous string value of a key after setting it to a new value.","since","1.0.0","group","string","complexity","O(1)","doc_flags",["deprecated"],"deprecated_since","6.2.0","replaced_by","`SET` with the `!GET` argument","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","value","type","string","display_text","value"]]],"hkeys",["summary","Returns all fields in a hash.","since","2.0.0","group","hash","complexity","O(N) where N is the size of the hash.","arguments",[["name","key","type","key","display_text","key","key_spec_index",0]]],"restore",["summary","Creates a key from the serialized representation of a value.","since","2.6.0","group","generic","complexity","O(1) to create the new key and additional O(N*M) to reconstruct the serialized value, where N is the number of Redis objects composing the value and M their average size. For small string values the time complexity is thus O(1)+O(1*M) where M is small, so simply O(1). However for sorted set values the complexity is O(N*M*log(N)) because inserting values into sorted sets is O(log(N)).","history",[["3.0.0","Added the `REPLACE` modifier."],["5.0.0","Added the `ABSTTL` modifier."],["5.0.0","Added the `IDLETIME` and `FREQ` options."]],"arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","ttl","type","integer","display_text","ttl"],["name","serialized-value","type","string","display_text","serialized-value"],["name","replace","type","pure-token","display_text","replace","token","REPLACE","since","3.0.0","flags",["optional"]],["name","absttl","type","pure-token","display_text","absttl","token","ABSTTL","since","5.0.0","flags",["optional"]],["name","seconds","type","integer","display_text","seconds","token","IDLETIME","since","5.0.0","flags",["optional"]],["name","frequency","type","integer","display_text","frequency","token","FREQ","since","5.0.0","flags",["optional"]]]],"asking",["summary","Signals that a cluster client is following an -ASK redirect.","since","3.0.0","group","cluster","complexity","O(1)"],"memory",["summary","A container for memory diagnostics commands.","since","4.0.0","group","server","complexity","Depends on subcommand.","subcommands",["memory|purge",["summary","Asks the allocator to release memory.","since","4.0.0","group","server","complexity","Depends on how much memory is allocated, could be slow"],"memory|malloc-stats",["summary","Returns the allocator statistics.","since","4.0.0","group","server","complexity","Depends on how much memory is allocated, could be slow"],"memory|usage",["summary","Estimates the memory usage of a key.","since","4.0.0","group","server","complexity","O(N) where N is the number of samples.","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","count","type","integer","display_text","count","token","SAMPLES","flags",["optional"]]]],"memory|doctor",["summary","Outputs a memory problems report.","since","4.0.0","group","server","complexity","O(1)"],"memory|stats",["summary","Returns details about memory usage.","since","4.0.0","group","server","complexity","O(1)"],"memory|help",["summary","Returns helpful text about the different subcommands.","since","4.0.0","group","server","complexity","O(1)"]]],"rpushx",["summary","Appends an element to a list only when the list exists.","since","2.2.0","group","list","complexity","O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.","history",[["4.0.0","Accepts multiple `element` arguments."]],"arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","element","type","string","display_text","element","flags",["multiple"]]]],"discard",["summary","Discards a transaction.","since","2.0.0","group","transactions","complexity","O(N), when N is the number of queued commands"],"lpop",["summary","Returns the first elements in a list after removing it. Deletes the list if the last element was popped.","since","1.0.0","group","list","complexity","O(N) where N is the number of elements returned","history",[["6.2.0","Added the `count` argument."]],"arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","count","type","integer","display_text","count","since","6.2.0","flags",["optional"]]]],"zremrangebyrank",["summary","Removes members in a sorted set within a range of indexes. Deletes the sorted set if all members were removed.","since","2.0.0","group","sorted-set","complexity","O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","start","type","integer","display_text","start"],["name","stop","type","integer","display_text","stop"]]],"zrank",["summary","Returns the index of a member in a sorted set ordered by ascending scores.","since","2.0.0","group","sorted-set","complexity","O(log(N))","history",[["7.2.0","Added the optional `WITHSCORE` argument."]],"arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","member","type","string","display_text","member"],["name","withscore","type","pure-token","display_text","withscore","token","WITHSCORE","flags",["optional"]]]],"sunionstore",["summary","Stores the union of multiple sets in a key.","since","1.0.0","group","set","complexity","O(N) where N is the total number of elements in all given sets.","arguments",[["name","destination","type","key","display_text","destination","key_spec_index",0],["name","key","type","key","display_text","key","key_spec_index",1,"flags",["multiple"]]]],"brpoplpush",["summary","Pops an element from a list, pushes it to another list and returns it. Block until an element is available otherwise. Deletes the list if the last element was popped.","since","2.2.0","group","list","complexity","O(1)","doc_flags",["deprecated"],"deprecated_since","6.2.0","replaced_by","`BLMOVE` with the `RIGHT` and `LEFT` arguments","history",[["6.0.0","`timeout` is interpreted as a double instead of an integer."]],"arguments",[["name","source","type","key","display_text","source","key_spec_index",0],["name","destination","type","key","display_text","destination","key_spec_index",1],["name","timeout","type","double","display_text","timeout"]]],"srem",["summary","Removes one or more members from a set. Deletes the set if the last member was removed.","since","1.0.0","group","set","complexity","O(N) where N is the number of members to be removed.","history",[["2.4.0","Accepts multiple `member` arguments."]],"arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","member","type","string","display_text","member","flags",["multiple"]]]],"lolwut",["summary","Displays computer art and the Redis version","since","5.0.0","group","server","arguments",[["name","version","type","integer","display_text","version","token","VERSION","flags",["optional"]]]],"setrange",["summary","Overwrites a part of a string value with another by an offset. Creates the key if it doesn't exist.","since","2.2.0","group","string","complexity","O(1), not counting the time taken to copy the new string in place. Usually, this string is very small so the amortized complexity is O(1). Otherwise, complexity is O(M) with M being the length of the value argument.","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","offset","type","integer","display_text","offset"],["name","value","type","string","display_text","value"]]],"xack",["summary","Returns the number of messages that were successfully acknowledged by the consumer group member of a stream.","since","5.0.0","group","stream","complexity","O(1) for each message ID processed.","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","group","type","string","display_text","group"],["name","id","type","string","display_text","id","flags",["multiple"]]]],"persist",["summary","Removes the expiration time of a key.","since","2.2.0","group","generic","complexity","O(1)","arguments",[["name","key","type","key","display_text","key","key_spec_index",0]]],"pfdebug",["summary","Internal commands for debugging HyperLogLog values.","since","2.8.9","group","hyperloglog","complexity","N/A","doc_flags",["syscmd"],"arguments",[["name","subcommand","type","string","display_text","subcommand"],["name","key","type","key","display_text","key","key_spec_index",0]]],"lcs",["summary","Finds the longest common substring.","since","7.0.0","group","string","complexity","O(N*M) where N and M are the lengths of s1 and s2, respectively","arguments",[["name","key1","type","key","display_text","key1","key_spec_index",0],["name","key2","type","key","display_text","key2","key_spec_index",0],["name","len","type","pure-token","display_text","len","token","LEN","flags",["optional"]],["name","idx","type","pure-token","display_text","idx","token","IDX","flags",["optional"]],["name","min-match-len","type","integer","display_text","min-match-len","token","MINMATCHLEN","flags",["optional"]],["name","withmatchlen","type","pure-token","display_text","withmatchlen","token","WITHMATCHLEN","flags",["optional"]]]],"llen",["summary","Returns the length of a list.","since","1.0.0","group","list","complexity","O(1)","arguments",[["name","key","type","key","display_text","key","key_spec_index",0]]],"echo",["summary","Returns the given string.","since","1.0.0","group","connection","complexity","O(1)","arguments",[["name","message","type","string","display_text","message"]]],"zrem",["summary","Removes one or more members from a sorted set. Deletes the sorted set if all members were removed.","since","1.2.0","group","sorted-set","complexity","O(M*log(N)) with N being the number of elements in the sorted set and M the number of elements to be removed.","history",[["2.4.0","Accepts multiple elements."]],"arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","member","type","string","display_text","member","flags",["multiple"]]]],"client",["summary","A container for client connection commands.","since","2.4.0","group","connection","complexity","Depends on subcommand.","subcommands",["client|tracking",["summary","Controls server-assisted client-side caching for the connection.","since","6.0.0","group","connection","complexity","O(1). Some options may introduce additional complexity.","arguments",[["name","status","type","oneof","arguments",[["name","on","type","pure-token","display_text","on","token","ON"],["name","off","type","pure-token","display_text","off","token","OFF"]]],["name","client-id","type","integer","display_text","client-id","token","REDIRECT","flags",["optional"]],["name","prefix","type","string","display_text","prefix","token","PREFIX","flags",["optional","multiple","multiple_token"]],["name","bcast","type","pure-token","display_text","bcast","token","BCAST","flags",["optional"]],["name","optin","type","pure-token","display_text","optin","token","OPTIN","flags",["optional"]],["name","optout","type","pure-token","display_text","optout","token","OPTOUT","flags",["optional"]],["name","noloop","type","pure-token","display_text","noloop","token","NOLOOP","flags",["optional"]]]],"client|kill",["summary","Terminates open connections.","since","2.4.0","group","connection","complexity","O(N) where N is the number of client connections","history",[["2.8.12","Added new filter format."],["2.8.12","`ID` option."],["3.2.0","Added `master` type in for `TYPE` option."],["5.0.0","Replaced `slave` `TYPE` with `replica`. `slave` still supported for backward compatibility."],["6.2.0","`LADDR` option."]],"arguments",[["name","filter","type","oneof","arguments",[["name","old-format","type","string","display_text","ip:port","deprecated_since","2.8.12"],["name","new-format","type","oneof","flags",["multiple"],"arguments",[["name","client-id","type","integer","display_text","client-id","token","ID","since","2.8.12","flags",["optional"]],["name","client-type","type","oneof","token","TYPE","since","2.8.12","flags",["optional"],"arguments",[["name","normal","type","pure-token","display_text","normal","token","NORMAL"],["name","master","type","pure-token","display_text","master","token","MASTER","since","3.2.0"],["name","slave","type","pure-token","display_text","slave","token","SLAVE"],["name","replica","type","pure-token","display_text","replica","token","REPLICA","since","5.0.0"],["name","pubsub","type","pure-token","display_text","pubsub","token","PUBSUB"]]],["name","username","type","string","display_text","username","token","USER","flags",["optional"]],["name","addr","type","string","display_text","ip:port","token","ADDR","flags",["optional"]],["name","laddr","type","string","display_text","ip:port","token","LADDR","since","6.2.0","flags",["optional"]],["name","skipme","type","oneof","token","SKIPME","flags",["optional"],"arguments",[["name","yes","type","pure-token","display_text","yes","token","YES"],["name","no","type","pure-token","display_text","no","token","NO"]]]]]]]]],"client|no-evict",["summary","Sets the client eviction mode of the connection.","since","7.0.0","group","connection","complexity","O(1)","arguments",[["name","enabled","type","oneof","arguments",[["name","on","type","pure-token","display_text","on","token","ON"],["name","off","type","pure-token","display_text","off","token","OFF"]]]]],"client|help",["summary","Returns helpful text about the different subcommands.","since","5.0.0","group","connection","complexity","O(1)"],"client|setinfo",["summary","Sets information specific to the client or connection.","since","7.2.0","group","connection","complexity","O(1)","arguments",[["name","attr","type","oneof","arguments",[["name","libname","type","string","display_text","libname","token","LIB-NAME"],["name","libver","type","string","display_text","libver","token","LIB-VER"]]]]],"client|no-touch",["summary","Controls whether commands sent by the client affect the LRU/LFU of accessed keys.","since","7.2.0","group","connection","complexity","O(1)","arguments",[["name","enabled","type","oneof","arguments",[["name","on","type","pure-token","display_text","on","token","ON"],["name","off","type","pure-token","display_text","off","token","OFF"]]]]],"client|pause",["summary","Suspends commands processing.","since","3.0.0","group","connection","complexity","O(1)","history",[["6.2.0","`CLIENT PAUSE WRITE` mode added along with the `mode` option."]],"arguments",[["name","timeout","type","integer","display_text","timeout"],["name","mode","type","oneof","since","6.2.0","flags",["optional"],"arguments",[["name","write","type","pure-token","display_text","write","token","WRITE"],["name","all","type","pure-token","display_text","all","token","ALL"]]]]],"client|reply",["summary","Instructs the server whether to reply to commands.","since","3.2.0","group","connection","complexity","O(1)","arguments",[["name","action","type","oneof","arguments",[["name","on","type","pure-token","display_text","on","token","ON"],["name","off","type","pure-token","display_text","off","token","OFF"],["name","skip","type","pure-token","display_text","skip","token","SKIP"]]]]],"client|trackinginfo",["summary","Returns information about server-assisted client-side caching for the connection.","since","6.2.0","group","connection","complexity","O(1)"],"client|caching",["summary","Instructs the server whether to track the keys in the next request.","since","6.0.0","group","connection","complexity","O(1)","arguments",[["name","mode","type","oneof","arguments",[["name","yes","type","pure-token","display_text","yes","token","YES"],["name","no","type","pure-token","display_text","no","token","NO"]]]]],"client|getname",["summary","Returns the name of the connection.","since","2.6.9","group","connection","complexity","O(1)"],"client|getredir",["summary","Returns the client ID to which the connection's tracking notifications are redirected.","since","6.0.0","group","connection","complexity","O(1)"],"client|setname",["summary","Sets the connection name.","since","2.6.9","group","connection","complexity","O(1)","arguments",[["name","connection-name","type","string","display_text","connection-name"]]],"client|info",["summary","Returns information about the connection.","since","6.2.0","group","connection","complexity","O(1)"],"client|list",["summary","Lists open connections.","since","2.4.0","group","connection","complexity","O(N) where N is the number of client connections","history",[["2.8.12","Added unique client `id` field."],["5.0.0","Added optional `TYPE` filter."],["6.0.0","Added `user` field."],["6.2.0","Added `argv-mem`, `tot-mem`, `laddr` and `redir` fields and the optional `ID` filter."],["7.0.0","Added `resp`, `multi-mem`, `rbs` and `rbp` fields."],["7.0.3","Added `ssub` field."]],"arguments",[["name","client-type","type","oneof","token","TYPE","since","5.0.0","flags",["optional"],"arguments",[["name","normal","type","pure-token","display_text","normal","token","NORMAL"],["name","master","type","pure-token","display_text","master","token","MASTER"],["name","replica","type","pure-token","display_text","replica","token","REPLICA"],["name","pubsub","type","pure-token","display_text","pubsub","token","PUBSUB"]]],["name","client-id","type","integer","display_text","client-id","token","ID","since","6.2.0","flags",["optional","multiple"]]]],"client|id",["summary","Returns the unique client ID of the connection.","since","5.0.0","group","connection","complexity","O(1)"],"client|unpause",["summary","Resumes processing commands from paused clients.","since","6.2.0","group","connection","complexity","O(N) Where N is the number of paused clients"],"client|unblock",["summary","Unblocks a client blocked by a blocking command from a different connection.","since","5.0.0","group","connection","complexity","O(log N) where N is the number of client connections","arguments",[["name","client-id","type","integer","display_text","client-id"],["name","unblock-type","type","oneof","flags",["optional"],"arguments",[["name","timeout","type","pure-token","display_text","timeout","token","TIMEOUT"],["name","error","type","pure-token","display_text","error","token","ERROR"]]]]]]],"xautoclaim",["summary","Changes, or acquires, ownership of messages in a consumer group, as if the messages were delivered to as consumer group member.","since","6.2.0","group","stream","complexity","O(1) if COUNT is small.","history",[["7.0.0","Added an element to the reply array, containing deleted entries the command cleared from the PEL"]],"arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","group","type","string","display_text","group"],["name","consumer","type","string","display_text","consumer"],["name","min-idle-time","type","string","display_text","min-idle-time"],["name","start","type","string","display_text","start"],["name","count","type","integer","display_text","count","token","COUNT","flags",["optional"]],["name","justid","type","pure-token","display_text","justid","token","JUSTID","flags",["optional"]]]],"geosearchstore",["summary","Queries a geospatial index for members inside an area of a box or a circle, optionally stores the result.","since","6.2.0","group","geo","complexity","O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape","history",[["7.0.0","Added support for uppercase unit names."]],"arguments",[["name","destination","type","key","display_text","destination","key_spec_index",0],["name","source","type","key","display_text","source","key_spec_index",1],["name","from","type","oneof","arguments",[["name","member","type","string","display_text","member","token","FROMMEMBER"],["name","fromlonlat","type","block","token","FROMLONLAT","arguments",[["name","longitude","type","double","display_text","longitude"],["name","latitude","type","double","display_text","latitude"]]]]],["name","by","type","oneof","arguments",[["name","circle","type","block","arguments",[["name","radius","type","double","display_text","radius","token","BYRADIUS"],["name","unit","type","oneof","arguments",[["name","m","type","pure-token","display_text","m","token","M"],["name","km","type","pure-token","display_text","km","token","KM"],["name","ft","type","pure-token","display_text","ft","token","FT"],["name","mi","type","pure-token","display_text","mi","token","MI"]]]]],["name","box","type","block","arguments",[["name","width","type","double","display_text","width","token","BYBOX"],["name","height","type","double","display_text","height"],["name","unit","type","oneof","arguments",[["name","m","type","pure-token","display_text","m","token","M"],["name","km","type","pure-token","display_text","km","token","KM"],["name","ft","type","pure-token","display_text","ft","token","FT"],["name","mi","type","pure-token","display_text","mi","token","MI"]]]]]]],["name","order","type","oneof","flags",["optional"],"arguments",[["name","asc","type","pure-token","display_text","asc","token","ASC"],["name","desc","type","pure-token","display_text","desc","token","DESC"]]],["name","count-block","type","block","flags",["optional"],"arguments",[["name","count","type","integer","display_text","count","token","COUNT"],["name","any","type","pure-token","display_text","any","token","ANY","flags",["optional"]]]],["name","storedist","type","pure-token","display_text","storedist","token","STOREDIST","flags",["optional"]]]],"cluster",["summary","A container for Redis Cluster commands.","since","3.0.0","group","cluster","complexity","Depends on subcommand.","subcommands",["cluster|slots",["summary","Returns the mapping of cluster slots to nodes.","since","3.0.0","group","cluster","complexity","O(N) where N is the total number of Cluster nodes","doc_flags",["deprecated"],"deprecated_since","7.0.0","replaced_by","`CLUSTER SHARDS`","history",[["4.0.0","Added node IDs."],["7.0.0","Added additional networking metadata field."]]],"cluster|nodes",["summary","Returns the cluster configuration for a node.","since","3.0.0","group","cluster","complexity","O(N) where N is the total number of Cluster nodes"],"cluster|count-failure-reports",["summary","Returns the number of active failure reports active for a node.","since","3.0.0","group","cluster","complexity","O(N) where N is the number of failure reports","arguments",[["name","node-id","type","string","display_text","node-id"]]],"cluster|replicas",["summary","Lists the replica nodes of a master node.","since","5.0.0","group","cluster","complexity","O(N) where N is the number of replicas.","arguments",[["name","node-id","type","string","display_text","node-id"]]],"cluster|saveconfig",["summary","Forces a node to save the cluster configuration to disk.","since","3.0.0","group","cluster","complexity","O(1)"],"cluster|help",["summary","Returns helpful text about the different subcommands.","since","5.0.0","group","cluster","complexity","O(1)"],"cluster|set-config-epoch",["summary","Sets the configuration epoch for a new node.","since","3.0.0","group","cluster","complexity","O(1)","arguments",[["name","config-epoch","type","integer","display_text","config-epoch"]]],"cluster|shards",["summary","Returns the mapping of cluster slots to shards.","since","7.0.0","group","cluster","complexity","O(N) where N is the total number of cluster nodes"],"cluster|getkeysinslot",["summary","Returns the key names in a hash slot.","since","3.0.0","group","cluster","complexity","O(N) where N is the number of requested keys","arguments",[["name","slot","type","integer","display_text","slot"],["name","count","type","integer","display_text","count"]]],"cluster|flushslots",["summary","Deletes all slots information from a node.","since","3.0.0","group","cluster","complexity","O(1)"],"cluster|bumpepoch",["summary","Advances the cluster config epoch.","since","3.0.0","group","cluster","complexity","O(1)"],"cluster|myid",["summary","Returns the ID of a node.","since","3.0.0","group","cluster","complexity","O(1)"],"cluster|forget",["summary","Removes a node from the nodes table.","since","3.0.0","group","cluster","complexity","O(1)","arguments",[["name","node-id","type","string","display_text","node-id"]]],"cluster|addslotsrange",["summary","Assigns new hash slot ranges to a node.","since","7.0.0","group","cluster","complexity","O(N) where N is the total number of the slots between the start slot and end slot arguments.","arguments",[["name","range","type","block","flags",["multiple"],"arguments",[["name","start-slot","type","integer","display_text","start-slot"],["name","end-slot","type","integer","display_text","end-slot"]]]]],"cluster|keyslot",["summary","Returns the hash slot for a key.","since","3.0.0","group","cluster","complexity","O(N) where N is the number of bytes in the key","arguments",[["name","key","type","string","display_text","key"]]],"cluster|info",["summary","Returns information about the state of a node.","since","3.0.0","group","cluster","complexity","O(1)"],"cluster|setslot",["summary","Binds a hash slot to a node.","since","3.0.0","group","cluster","complexity","O(1)","arguments",[["name","slot","type","integer","display_text","slot"],["name","subcommand","type","oneof","arguments",[["name","importing","type","string","display_text","node-id","token","IMPORTING"],["name","migrating","type","string","display_text","node-id","token","MIGRATING"],["name","node","type","string","display_text","node-id","token","NODE"],["name","stable","type","pure-token","display_text","stable","token","STABLE"]]]]],"cluster|delslots",["summary","Sets hash slots as unbound for a node.","since","3.0.0","group","cluster","complexity","O(N) where N is the total number of hash slot arguments","arguments",[["name","slot","type","integer","display_text","slot","flags",["multiple"]]]],"cluster|failover",["summary","Forces a replica to perform a manual failover of its master.","since","3.0.0","group","cluster","complexity","O(1)","arguments",[["name","options","type","oneof","flags",["optional"],"arguments",[["name","force","type","pure-token","display_text","force","token","FORCE"],["name","takeover","type","pure-token","display_text","takeover","token","TAKEOVER"]]]]],"cluster|reset",["summary","Resets a node.","since","3.0.0","group","cluster","complexity","O(N) where N is the number of known nodes. The command may execute a FLUSHALL as a side effect.","arguments",[["name","reset-type","type","oneof","flags",["optional"],"arguments",[["name","hard","type","pure-token","display_text","hard","token","HARD"],["name","soft","type","pure-token","display_text","soft","token","SOFT"]]]]],"cluster|replicate",["summary","Configure a node as replica of a master node.","since","3.0.0","group","cluster","complexity","O(1)","arguments",[["name","node-id","type","string","display_text","node-id"]]],"cluster|meet",["summary","Forces a node to handshake with another node.","since","3.0.0","group","cluster","complexity","O(1)","history",[["4.0.0","Added the optional `cluster_bus_port` argument."]],"arguments",[["name","ip","type","string","display_text","ip"],["name","port","type","integer","display_text","port"],["name","cluster-bus-port","type","integer","display_text","cluster-bus-port","since","4.0.0","flags",["optional"]]]],"cluster|delslotsrange",["summary","Sets hash slot ranges as unbound for a node.","since","7.0.0","group","cluster","complexity","O(N) where N is the total number of the slots between the start slot and end slot arguments.","arguments",[["name","range","type","block","flags",["multiple"],"arguments",[["name","start-slot","type","integer","display_text","start-slot"],["name","end-slot","type","integer","display_text","end-slot"]]]]],"cluster|myshardid",["summary","Returns the shard ID of a node.","since","7.2.0","group","cluster","complexity","O(1)"],"cluster|slaves",["summary","Lists the replica nodes of a master node.","since","3.0.0","group","cluster","complexity","O(N) where N is the number of replicas.","doc_flags",["deprecated"],"deprecated_since","5.0.0","replaced_by","`CLUSTER REPLICAS`","arguments",[["name","node-id","type","string","display_text","node-id"]]],"cluster|addslots",["summary","Assigns new hash slots to a node.","since","3.0.0","group","cluster","complexity","O(N) where N is the total number of hash slot arguments","arguments",[["name","slot","type","integer","display_text","slot","flags",["multiple"]]]],"cluster|links",["summary","Returns a list of all TCP links to and from peer nodes.","since","7.0.0","group","cluster","complexity","O(N) where N is the total number of Cluster nodes"],"cluster|countkeysinslot",["summary","Returns the number of keys in a hash slot.","since","3.0.0","group","cluster","complexity","O(1)","arguments",[["name","slot","type","integer","display_text","slot"]]]]],"rename",["summary","Renames a key and overwrites the destination.","since","1.0.0","group","generic","complexity","O(1)","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","newkey","type","key","display_text","newkey","key_spec_index",1]]],"zintercard",["summary","Returns the number of members of the intersect of multiple sorted sets.","since","7.0.0","group","sorted-set","complexity","O(N*K) worst case with N being the smallest input sorted set, K being the number of input sorted sets.","arguments",[["name","numkeys","type","integer","display_text","numkeys"],["name","key","type","key","display_text","key","key_spec_index",0,"flags",["multiple"]],["name","limit","type","integer","display_text","limit","token","LIMIT","flags",["optional"]]]],"psetex",["summary","Sets both string value and expiration time in milliseconds of a key. The key is created if it doesn't exist.","since","2.6.0","group","string","complexity","O(1)","doc_flags",["deprecated"],"deprecated_since","2.6.12","replaced_by","`SET` with the `PX` argument","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","milliseconds","type","integer","display_text","milliseconds"],["name","value","type","string","display_text","value"]]],"xread",["summary","Returns messages from multiple streams with IDs greater than the ones requested. Blocks until a message is available otherwise.","since","5.0.0","group","stream","arguments",[["name","count","type","integer","display_text","count","token","COUNT","flags",["optional"]],["name","milliseconds","type","integer","display_text","milliseconds","token","BLOCK","flags",["optional"]],["name","streams","type","block","token","STREAMS","arguments",[["name","key","type","key","display_text","key","key_spec_index",0,"flags",["multiple"]],["name","id","type","string","display_text","id","flags",["multiple"]]]]]],"zcount",["summary","Returns the count of members in a sorted set that have scores within a range.","since","2.0.0","group","sorted-set","complexity","O(log(N)) with N being the number of elements in the sorted set.","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","min","type","double","display_text","min"],["name","max","type","double","display_text","max"]]],"wait",["summary","Blocks until the asynchronous replication of all preceding write commands sent by the connection is completed.","since","3.0.0","group","generic","complexity","O(1)","arguments",[["name","numreplicas","type","integer","display_text","numreplicas"],["name","timeout","type","integer","display_text","timeout"]]],"getrange",["summary","Returns a substring of the string stored at a key.","since","2.4.0","group","string","complexity","O(N) where N is the length of the returned string. The complexity is ultimately determined by the returned length, but because creating a substring from an existing string is very cheap, it can be considered O(1) for small strings.","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","start","type","integer","display_text","start"],["name","end","type","integer","display_text","end"]]],"ssubscribe",["summary","Listens for messages published to shard channels.","since","7.0.0","group","pubsub","complexity","O(N) where N is the number of shard channels to subscribe to.","arguments",[["name","shardchannel","type","string","display_text","shardchannel","flags",["multiple"]]]],"latency",["summary","A container for latency diagnostics commands.","since","2.8.13","group","server","complexity","Depends on subcommand.","subcommands",["latency|latest",["summary","Returns the latest latency samples for all events.","since","2.8.13","group","server","complexity","O(1)"],"latency|doctor",["summary","Returns a human-readable latency analysis report.","since","2.8.13","group","server","complexity","O(1)"],"latency|reset",["summary","Resets the latency data for one or more events.","since","2.8.13","group","server","complexity","O(1)","arguments",[["name","event","type","string","display_text","event","flags",["optional","multiple"]]]],"latency|histogram",["summary","Returns the cumulative distribution of latencies of a subset or all commands.","since","7.0.0","group","server","complexity","O(N) where N is the number of commands with latency information being retrieved.","arguments",[["name","command","type","string","display_text","command","flags",["optional","multiple"]]]],"latency|graph",["summary","Returns a latency graph for an event.","since","2.8.13","group","server","complexity","O(1)","arguments",[["name","event","type","string","display_text","event"]]],"latency|help",["summary","Returns helpful text about the different subcommands.","since","2.8.13","group","server","complexity","O(1)"],"latency|history",["summary","Returns timestamp-latency samples for an event.","since","2.8.13","group","server","complexity","O(1)","arguments",[["name","event","type","string","display_text","event"]]]]],"zremrangebyscore",["summary","Removes members in a sorted set within a range of scores. Deletes the sorted set if all members were removed.","since","1.2.0","group","sorted-set","complexity","O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","min","type","double","display_text","min"],["name","max","type","double","display_text","max"]]],"setex",["summary","Sets the string value and expiration time of a key. Creates the key if it doesn't exist.","since","2.0.0","group","string","complexity","O(1)","doc_flags",["deprecated"],"deprecated_since","2.6.12","replaced_by","`SET` with the `EX` argument","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","seconds","type","integer","display_text","seconds"],["name","value","type","string","display_text","value"]]],"multi",["summary","Starts a transaction.","since","1.2.0","group","transactions","complexity","O(1)"],"sunion",["summary","Returns the union of multiple sets.","since","1.0.0","group","set","complexity","O(N) where N is the total number of elements in all given sets.","arguments",[["name","key","type","key","display_text","key","key_spec_index",0,"flags",["multiple"]]]],"randomkey",["summary","Returns a random key name from the database.","since","1.0.0","group","generic","complexity","O(1)"],"fcall",["summary","Invokes a function.","since","7.0.0","group","scripting","complexity","Depends on the function that is executed.","arguments",[["name","function","type","string","display_text","function"],["name","numkeys","type","integer","display_text","numkeys"],["name","key","type","key","display_text","key","key_spec_index",0,"flags",["optional","multiple"]],["name","arg","type","string","display_text","arg","flags",["optional","multiple"]]]],"sscan",["summary","Iterates over members of a set.","since","2.8.0","group","set","complexity","O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection.","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","cursor","type","integer","display_text","cursor"],["name","pattern","type","pattern","display_text","pattern","token","MATCH","flags",["optional"]],["name","count","type","integer","display_text","count","token","COUNT","flags",["optional"]]]],"set",["summary","Sets the string value of a key, ignoring its type. The key is created if it doesn't exist.","since","1.0.0","group","string","complexity","O(1)","history",[["2.6.12","Added the `EX`, `PX`, `NX` and `XX` options."],["6.0.0","Added the `KEEPTTL` option."],["6.2.0","Added the `GET`, `EXAT` and `PXAT` option."],["7.0.0","Allowed the `NX` and `GET` options to be used together."]],"arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","value","type","string","display_text","value"],["name","condition","type","oneof","since","2.6.12","flags",["optional"],"arguments",[["name","nx","type","pure-token","display_text","nx","token","NX"],["name","xx","type","pure-token","display_text","xx","token","XX"]]],["name","get","type","pure-token","display_text","get","token","GET","since","6.2.0","flags",["optional"]],["name","expiration","type","oneof","flags",["optional"],"arguments",[["name","seconds","type","integer","display_text","seconds","token","EX","since","2.6.12"],["name","milliseconds","type","integer","display_text","milliseconds","token","PX","since","2.6.12"],["name","unix-time-seconds","type","unix-time","display_text","unix-time-seconds","token","EXAT","since","6.2.0"],["name","unix-time-milliseconds","type","unix-time","display_text","unix-time-milliseconds","token","PXAT","since","6.2.0"],["name","keepttl","type","pure-token","display_text","keepttl","token","KEEPTTL","since","6.0.0"]]]]],"zinterstore",["summary","Stores the intersect of multiple sorted sets in a key.","since","2.0.0","group","sorted-set","complexity","O(N*K)+O(M*log(M)) worst case with N being the smallest input sorted set, K being the number of input sorted sets and M being the number of elements in the resulting sorted set.","arguments",[["name","destination","type","key","display_text","destination","key_spec_index",0],["name","numkeys","type","integer","display_text","numkeys"],["name","key","type","key","display_text","key","key_spec_index",1,"flags",["multiple"]],["name","weight","type","integer","display_text","weight","token","WEIGHTS","flags",["optional","multiple"]],["name","aggregate","type","oneof","token","AGGREGATE","flags",["optional"],"arguments",[["name","sum","type","pure-token","display_text","sum","token","SUM"],["name","min","type","pure-token","display_text","min","token","MIN"],["name","max","type","pure-token","display_text","max","token","MAX"]]]]],"lindex",["summary","Returns an element from a list by its index.","since","1.0.0","group","list","complexity","O(N) where N is the number of elements to traverse to get to the element at index. This makes asking for the first or the last element of the list O(1).","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","index","type","integer","display_text","index"]]],"lastsave",["summary","Returns the Unix timestamp of the last successful save to disk.","since","1.0.0","group","server","complexity","O(1)"],"hset",["summary","Creates or modifies the value of a field in a hash.","since","2.0.0","group","hash","complexity","O(1) for each field/value pair added, so O(N) to add N field/value pairs when the command is called with multiple field/value pairs.","history",[["4.0.0","Accepts multiple `field` and `value` arguments."]],"arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","data","type","block","flags",["multiple"],"arguments",[["name","field","type","string","display_text","field"],["name","value","type","string","display_text","value"]]]]],"punsubscribe",["summary","Stops listening to messages published to channels that match one or more patterns.","since","2.0.0","group","pubsub","complexity","O(N) where N is the number of patterns to unsubscribe.","arguments",[["name","pattern","type","pattern","display_text","pattern","flags",["optional","multiple"]]]],"bgrewriteaof",["summary","Asynchronously rewrites the append-only file to disk.","since","1.0.0","group","server","complexity","O(1)"],"georadius",["summary","Queries a geospatial index for members within a distance from a coordinate, optionally stores the result.","since","3.2.0","group","geo","complexity","O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.","doc_flags",["deprecated"],"deprecated_since","6.2.0","replaced_by","`GEOSEARCH` and `GEOSEARCHSTORE` with the `BYRADIUS` argument","history",[["6.2.0","Added the `ANY` option for `COUNT`."],["7.0.0","Added support for uppercase unit names."]],"arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","longitude","type","double","display_text","longitude"],["name","latitude","type","double","display_text","latitude"],["name","radius","type","double","display_text","radius"],["name","unit","type","oneof","arguments",[["name","m","type","pure-token","display_text","m","token","M"],["name","km","type","pure-token","display_text","km","token","KM"],["name","ft","type","pure-token","display_text","ft","token","FT"],["name","mi","type","pure-token","display_text","mi","token","MI"]]],["name","withcoord","type","pure-token","display_text","withcoord","token","WITHCOORD","flags",["optional"]],["name","withdist","type","pure-token","display_text","withdist","token","WITHDIST","flags",["optional"]],["name","withhash","type","pure-token","display_text","withhash","token","WITHHASH","flags",["optional"]],["name","count-block","type","block","flags",["optional"],"arguments",[["name","count","type","integer","display_text","count","token","COUNT"],["name","any","type","pure-token","display_text","any","token","ANY","since","6.2.0","flags",["optional"]]]],["name","order","type","oneof","flags",["optional"],"arguments",[["name","asc","type","pure-token","display_text","asc","token","ASC"],["name","desc","type","pure-token","display_text","desc","token","DESC"]]],["name","store","type","oneof","flags",["optional"],"arguments",[["name","storekey","type","key","display_text","key","key_spec_index",1,"token","STORE"],["name","storedistkey","type","key","display_text","key","key_spec_index",2,"token","STOREDIST"]]]]],"renamenx",["summary","Renames a key only when the target key name doesn't exist.","since","1.0.0","group","generic","complexity","O(1)","history",[["3.2.0","The command no longer returns an error when source and destination names are the same."]],"arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","newkey","type","key","display_text","newkey","key_spec_index",1]]],"dbsize",["summary","Returns the number of keys in the database.","since","1.0.0","group","server","complexity","O(1)"],"bitfield",["summary","Performs arbitrary bitfield integer operations on strings.","since","3.2.0","group","bitmap","complexity","O(1) for each subcommand specified","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","operation","type","oneof","flags",["optional","multiple"],"arguments",[["name","get-block","type","block","token","GET","arguments",[["name","encoding","type","string","display_text","encoding"],["name","offset","type","integer","display_text","offset"]]],["name","write","type","block","arguments",[["name","overflow-block","type","oneof","token","OVERFLOW","flags",["optional"],"arguments",[["name","wrap","type","pure-token","display_text","wrap","token","WRAP"],["name","sat","type","pure-token","display_text","sat","token","SAT"],["name","fail","type","pure-token","display_text","fail","token","FAIL"]]],["name","write-operation","type","oneof","arguments",[["name","set-block","type","block","token","SET","arguments",[["name","encoding","type","string","display_text","encoding"],["name","offset","type","integer","display_text","offset"],["name","value","type","integer","display_text","value"]]],["name","incrby-block","type","block","token","INCRBY","arguments",[["name","encoding","type","string","display_text","encoding"],["name","offset","type","integer","display_text","offset"],["name","increment","type","integer","display_text","increment"]]]]]]]]]]],"object",["summary","A container for object introspection commands.","since","2.2.3","group","generic","complexity","Depends on subcommand.","subcommands",["object|refcount",["summary","Returns the reference count of a value of a key.","since","2.2.3","group","generic","complexity","O(1)","arguments",[["name","key","type","key","display_text","key","key_spec_index",0]]],"object|encoding",["summary","Returns the internal encoding of a Redis object.","since","2.2.3","group","generic","complexity","O(1)","arguments",[["name","key","type","key","display_text","key","key_spec_index",0]]],"object|freq",["summary","Returns the logarithmic access frequency counter of a Redis object.","since","4.0.0","group","generic","complexity","O(1)","arguments",[["name","key","type","key","display_text","key","key_spec_index",0]]],"object|idletime",["summary","Returns the time since the last access to a Redis object.","since","2.2.3","group","generic","complexity","O(1)","arguments",[["name","key","type","key","display_text","key","key_spec_index",0]]],"object|help",["summary","Returns helpful text about the different subcommands.","since","6.2.0","group","generic","complexity","O(1)"]]],"zadd",["summary","Adds one or more members to a sorted set, or updates their scores. Creates the key if it doesn't exist.","since","1.2.0","group","sorted-set","complexity","O(log(N)) for each item added, where N is the number of elements in the sorted set.","history",[["2.4.0","Accepts multiple elements."],["3.0.2","Added the `XX`, `NX`, `CH` and `INCR` options."],["6.2.0","Added the `GT` and `LT` options."]],"arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","condition","type","oneof","since","3.0.2","flags",["optional"],"arguments",[["name","nx","type","pure-token","display_text","nx","token","NX"],["name","xx","type","pure-token","display_text","xx","token","XX"]]],["name","comparison","type","oneof","since","6.2.0","flags",["optional"],"arguments",[