ioredis-mock
Version:
This library emulates ioredis by performing all operations in-memory.
1 lines • 133 kB
JSON
["xclaim",["summary","Changes (or acquires) ownership of a message in a consumer group, as if the message was delivered to the specified consumer.","since","5.0.0","group","stream","complexity","O(log N) with N being the number of messages in the PEL of the consumer group.","arguments",[["name","key","type","key","key_spec_index",0],["name","group","type","string"],["name","consumer","type","string"],["name","min-idle-time","type","string"],["name","id","type","string","flags",["multiple"]],["name","ms","type","integer","token","IDLE","flags",["optional"]],["name","unix-time-milliseconds","type","unix-time","token","TIME","flags",["optional"]],["name","count","type","integer","token","RETRYCOUNT","flags",["optional"]],["name","force","type","pure-token","token","FORCE","flags",["optional"]],["name","justid","type","pure-token","token","JUSTID","flags",["optional"]]]],"sscan",["summary","Incrementally iterate Set elements","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","key_spec_index",0],["name","cursor","type","integer"],["name","pattern","type","pattern","token","MATCH","flags",["optional"]],["name","count","type","integer","token","COUNT","flags",["optional"]]]],"debug",["summary","A container for debugging commands","since","1.0.0","group","server","complexity","Depends on subcommand.","doc_flags",["syscmd"]],"zpopmin",["summary","Remove and return members with the lowest scores in a sorted set","since","5.0.0","group","sorted-set","complexity","O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped.","arguments",[["name","key","type","key","key_spec_index",0],["name","count","type","integer","flags",["optional"]]]],"zpopmax",["summary","Remove and return members with the highest scores in a sorted set","since","5.0.0","group","sorted-set","complexity","O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped.","arguments",[["name","key","type","key","key_spec_index",0],["name","count","type","integer","flags",["optional"]]]],"sintercard",["summary","Intersect multiple sets and return the cardinality of the result","since","7.0.0","group","set","complexity","O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.","arguments",[["name","numkeys","type","integer"],["name","key","type","key","key_spec_index",0,"flags",["multiple"]],["name","limit","type","integer","token","LIMIT","flags",["optional"]]]],"select",["summary","Change the selected database for the current connection","since","1.0.0","group","connection","complexity","O(1)","arguments",[["name","index","type","integer"]]],"expire",["summary","Set a key's time to live in seconds","since","1.0.0","group","generic","complexity","O(1)","history",[["7.0.0","Added options: `NX`, `XX`, `GT` and `LT`."]],"arguments",[["name","key","type","key","key_spec_index",0],["name","seconds","type","integer"],["name","condition","type","oneof","since","7.0.0","flags",["optional"],"arguments",[["name","nx","type","pure-token","token","NX"],["name","xx","type","pure-token","token","XX"],["name","gt","type","pure-token","token","GT"],["name","lt","type","pure-token","token","LT"]]]]],"blmpop",["summary","Pop elements from a list, or block until one is available","since","7.0.0","group","list","complexity","O(N+M) where N is the number of provided keys and M is the number of elements returned.","arguments",[["name","timeout","type","double"],["name","numkeys","type","integer"],["name","key","type","key","key_spec_index",0,"flags",["multiple"]],["name","where","type","oneof","arguments",[["name","left","type","pure-token","token","LEFT"],["name","right","type","pure-token","token","RIGHT"]]],["name","count","type","integer","token","COUNT","flags",["optional"]]]],"ltrim",["summary","Trim a list to the specified range","since","1.0.0","group","list","complexity","O(N) where N is the number of elements to be removed by the operation.","arguments",[["name","key","type","key","key_spec_index",0],["name","start","type","integer"],["name","stop","type","integer"]]],"hmset",["summary","Set multiple hash fields to multiple values","since","2.0.0","group","hash","complexity","O(N) where N is the number of fields being set.","doc_flags",["deprecated"],"deprecated_since","4.0.0","replaced_by","`HSET` with multiple field-value pairs","arguments",[["name","key","type","key","key_spec_index",0],["name","field_value","type","block","flags",["multiple"],"arguments",[["name","field","type","string"],["name","value","type","string"]]]]],"zincrby",["summary","Increment the score of a member in a sorted set","since","1.2.0","group","sorted-set","complexity","O(log(N)) where N is the number of elements in the sorted set.","arguments",[["name","key","type","key","key_spec_index",0],["name","increment","type","integer"],["name","member","type","string"]]],"lrange",["summary","Get a range of elements from a list","since","1.0.0","group","list","complexity","O(S+N) where S is the distance of start offset from HEAD for small lists, from nearest end (HEAD or TAIL) for large lists; and N is the number of elements in the specified range.","arguments",[["name","key","type","key","key_spec_index",0],["name","start","type","integer"],["name","stop","type","integer"]]],"xinfo",["summary","A container for stream introspection commands","since","5.0.0","group","stream","complexity","Depends on subcommand.","subcommands",["xinfo|stream",["summary","Get information about a stream","since","5.0.0","group","stream","complexity","O(1)","history",[["7.0.0","Added the `max-deleted-entry-id`, `entries-added`, `recorded-first-entry-id`, `entries-read` and `lag` fields"]],"arguments",[["name","key","type","key","key_spec_index",0],["name","full","type","block","token","FULL","flags",["optional"],"arguments",[["name","count","type","integer","token","COUNT","flags",["optional"]]]]]],"xinfo|help",["summary","Show helpful text about the different subcommands","since","5.0.0","group","stream","complexity","O(1)"],"xinfo|consumers",["summary","List the consumers in a consumer group","since","5.0.0","group","stream","complexity","O(1)","arguments",[["name","key","type","key","key_spec_index",0],["name","groupname","type","string"]]],"xinfo|groups",["summary","List the consumer groups of a stream","since","5.0.0","group","stream","complexity","O(1)","history",[["7.0.0","Added the `entries-read` and `lag` fields"]],"arguments",[["name","key","type","key","key_spec_index",0]]]]],"asking",["summary","Sent by cluster clients after an -ASK redirect","since","3.0.0","group","cluster","complexity","O(1)"],"info",["summary","Get information and statistics about the server","since","1.0.0","group","server","complexity","O(1)","history",[["7.0.0","Added support for taking multiple section arguments."]],"arguments",[["name","section","type","string","flags",["optional","multiple"]]]],"multi",["summary","Mark the start of a transaction block","since","1.2.0","group","transactions","complexity","O(1)"],"discard",["summary","Discard all commands issued after MULTI","since","2.0.0","group","transactions","complexity","O(N), when N is the number of queued commands"],"zrangebyscore",["summary","Return a range of members in a sorted set, by score","since","1.0.5","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 being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)).","doc_flags",["deprecated"],"deprecated_since","6.2.0","replaced_by","`ZRANGE` with the `BYSCORE` argument","history",[["2.0.0","Added the `WITHSCORES` modifier."]],"arguments",[["name","key","type","key","key_spec_index",0],["name","min","type","double"],["name","max","type","double"],["name","withscores","type","pure-token","token","WITHSCORES","since","2.0.0","flags",["optional"]],["name","offset_count","type","block","token","LIMIT","flags",["optional"],"arguments",[["name","offset","type","integer"],["name","count","type","integer"]]]]],"zadd",["summary","Add one or more members to a sorted set, or update its score if it already exists","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","key_spec_index",0],["name","condition","type","oneof","since","3.0.2","flags",["optional"],"arguments",[["name","nx","type","pure-token","token","NX"],["name","xx","type","pure-token","token","XX"]]],["name","comparison","type","oneof","since","6.2.0","flags",["optional"],"arguments",[["name","gt","type","pure-token","token","GT"],["name","lt","type","pure-token","token","LT"]]],["name","change","type","pure-token","token","CH","since","3.0.2","flags",["optional"]],["name","increment","type","pure-token","token","INCR","since","3.0.2","flags",["optional"]],["name","score_member","type","block","flags",["multiple"],"arguments",[["name","score","type","double"],["name","member","type","string"]]]]],"fcall",["summary","Invoke a function","since","7.0.0","group","scripting","complexity","Depends on the function that is executed.","arguments",[["name","function","type","string"],["name","numkeys","type","integer"],["name","key","type","key","key_spec_index",0,"flags",["multiple"]],["name","arg","type","string","flags",["multiple"]]]],"getset",["summary","Set the string value of a key and return its old 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","key_spec_index",0],["name","value","type","string"]]],"sismember",["summary","Determine if a given value is a member of a set","since","1.0.0","group","set","complexity","O(1)","arguments",[["name","key","type","key","key_spec_index",0],["name","member","type","string"]]],"srem",["summary","Remove one or more members from a set","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","key_spec_index",0],["name","member","type","string","flags",["multiple"]]]],"save",["summary","Synchronously save the dataset to disk","since","1.0.0","group","server","complexity","O(N) where N is the total number of keys in all databases"],"xlen",["summary","Return the number of entries in a stream","since","5.0.0","group","stream","complexity","O(1)","arguments",[["name","key","type","key","key_spec_index",0]]],"incrbyfloat",["summary","Increment the float value of a key by the given amount","since","2.6.0","group","string","complexity","O(1)","arguments",[["name","key","type","key","key_spec_index",0],["name","increment","type","double"]]],"lolwut",["summary","Display some computer art and the Redis version","since","5.0.0","group","server","arguments",[["name","version","type","integer","token","VERSION","flags",["optional"]]]],"decr",["summary","Decrement the integer value of a key by one","since","1.0.0","group","string","complexity","O(1)","arguments",[["name","key","type","key","key_spec_index",0]]],"bitcount",["summary","Count set bits in a string","since","2.6.0","group","bitmap","complexity","O(N)","history",[["7.0.0","Added the `BYTE|BIT` option."]],"arguments",[["name","key","type","key","key_spec_index",0],["name","index","type","block","flags",["optional"],"arguments",[["name","start","type","integer"],["name","end","type","integer"],["name","index_unit","type","oneof","since","7.0.0","flags",["optional"],"arguments",[["name","byte","type","pure-token","token","BYTE"],["name","bit","type","pure-token","token","BIT"]]]]]]],"zrange",["summary","Return a range of members in a sorted set","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 returned.","history",[["6.2.0","Added the `REV`, `BYSCORE`, `BYLEX` and `LIMIT` options."]],"arguments",[["name","key","type","key","key_spec_index",0],["name","min","type","string"],["name","max","type","string"],["name","sortby","type","oneof","since","6.2.0","flags",["optional"],"arguments",[["name","byscore","type","pure-token","token","BYSCORE"],["name","bylex","type","pure-token","token","BYLEX"]]],["name","rev","type","pure-token","token","REV","since","6.2.0","flags",["optional"]],["name","offset_count","type","block","token","LIMIT","since","6.2.0","flags",["optional"],"arguments",[["name","offset","type","integer"],["name","count","type","integer"]]],["name","withscores","type","pure-token","token","WITHSCORES","flags",["optional"]]]],"shutdown",["summary","Synchronously save the dataset to disk and then shut down the server","since","1.0.0","group","server","complexity","O(N) when saving, where N is the total number of keys in all databases when saving data, otherwise O(1)","history",[["7.0.0","Added the `NOW`, `FORCE` and `ABORT` modifiers."]],"arguments",[["name","nosave_save","type","oneof","flags",["optional"],"arguments",[["name","nosave","type","pure-token","token","NOSAVE"],["name","save","type","pure-token","token","SAVE"]]],["name","now","type","pure-token","token","NOW","since","7.0.0","flags",["optional"]],["name","force","type","pure-token","token","FORCE","since","7.0.0","flags",["optional"]],["name","abort","type","pure-token","token","ABORT","since","7.0.0","flags",["optional"]]]],"georadiusbymember_ro",["summary","A read-only variant for GEORADIUSBYMEMBER","since","3.2.10","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` with the `BYRADIUS` and `FROMMEMBER` arguments","arguments",[["name","key","type","key","key_spec_index",0],["name","member","type","string"],["name","radius","type","double"],["name","unit","type","oneof","arguments",[["name","m","type","pure-token","token","M"],["name","km","type","pure-token","token","KM"],["name","ft","type","pure-token","token","FT"],["name","mi","type","pure-token","token","MI"]]],["name","withcoord","type","pure-token","token","WITHCOORD","flags",["optional"]],["name","withdist","type","pure-token","token","WITHDIST","flags",["optional"]],["name","withhash","type","pure-token","token","WITHHASH","flags",["optional"]],["name","count","type","block","flags",["optional"],"arguments",[["name","count","type","integer","token","COUNT"],["name","any","type","pure-token","token","ANY","flags",["optional"]]]],["name","order","type","oneof","flags",["optional"],"arguments",[["name","asc","type","pure-token","token","ASC"],["name","desc","type","pure-token","token","DESC"]]]]],"georadiusbymember",["summary","Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a member","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` and `FROMMEMBER` arguments","arguments",[["name","key","type","key","key_spec_index",0],["name","member","type","string"],["name","radius","type","double"],["name","unit","type","oneof","arguments",[["name","m","type","pure-token","token","M"],["name","km","type","pure-token","token","KM"],["name","ft","type","pure-token","token","FT"],["name","mi","type","pure-token","token","MI"]]],["name","withcoord","type","pure-token","token","WITHCOORD","flags",["optional"]],["name","withdist","type","pure-token","token","WITHDIST","flags",["optional"]],["name","withhash","type","pure-token","token","WITHHASH","flags",["optional"]],["name","count","type","block","flags",["optional"],"arguments",[["name","count","type","integer","token","COUNT"],["name","any","type","pure-token","token","ANY","flags",["optional"]]]],["name","order","type","oneof","flags",["optional"],"arguments",[["name","asc","type","pure-token","token","ASC"],["name","desc","type","pure-token","token","DESC"]]],["name","key","type","key","key_spec_index",1,"token","STORE","flags",["optional"]],["name","key","type","key","key_spec_index",2,"token","STOREDIST","flags",["optional"]]]],"unsubscribe",["summary","Stop listening for messages posted to the given channels","since","2.0.0","group","pubsub","complexity","O(N) where N is the number of clients already subscribed to a channel.","arguments",[["name","channel","type","string","flags",["optional","multiple"]]]],"incrby",["summary","Increment the integer value of a key by the given amount","since","1.0.0","group","string","complexity","O(1)","arguments",[["name","key","type","key","key_spec_index",0],["name","increment","type","integer"]]],"llen",["summary","Get the length of a list","since","1.0.0","group","list","complexity","O(1)","arguments",[["name","key","type","key","key_spec_index",0]]],"zscore",["summary","Get the score associated with the given member in a sorted set","since","1.2.0","group","sorted-set","complexity","O(1)","arguments",[["name","key","type","key","key_spec_index",0],["name","member","type","string"]]],"geohash",["summary","Returns members of a geospatial index as standard geohash strings","since","3.2.0","group","geo","complexity","O(log(N)) for each member requested, where N is the number of elements in the sorted set.","arguments",[["name","key","type","key","key_spec_index",0],["name","member","type","string","flags",["multiple"]]]],"zinterstore",["summary","Intersect multiple sorted sets and store the resulting sorted set in a new 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","key_spec_index",0],["name","numkeys","type","integer"],["name","key","type","key","key_spec_index",1,"flags",["multiple"]],["name","weight","type","integer","token","WEIGHTS","flags",["optional","multiple"]],["name","aggregate","type","oneof","token","AGGREGATE","flags",["optional"],"arguments",[["name","sum","type","pure-token","token","SUM"],["name","min","type","pure-token","token","MIN"],["name","max","type","pure-token","token","MAX"]]]]],"dbsize",["summary","Return the number of keys in the selected database","since","1.0.0","group","server","complexity","O(1)"],"copy",["summary","Copy a key","since","6.2.0","group","generic","complexity","O(N) worst case for collections, where N is the number of nested items. O(1) for string values.","arguments",[["name","source","type","key","key_spec_index",0],["name","destination","type","key","key_spec_index",1],["name","destination-db","type","integer","token","DB","flags",["optional"]],["name","replace","type","pure-token","token","REPLACE","flags",["optional"]]]],"readwrite",["summary","Disables read queries for a connection to a cluster replica node","since","3.0.0","group","cluster","complexity","O(1)"],"object",["summary","A container for object introspection commands","since","2.2.3","group","generic","complexity","Depends on subcommand.","subcommands",["object|refcount",["summary","Get the number of references to the value of the key","since","2.2.3","group","generic","complexity","O(1)","arguments",[["name","key","type","key","key_spec_index",0]]],"object|help",["summary","Show helpful text about the different subcommands","since","6.2.0","group","generic","complexity","O(1)"],"object|idletime",["summary","Get the time since a Redis object was last accessed","since","2.2.3","group","generic","complexity","O(1)","arguments",[["name","key","type","key","key_spec_index",0]]],"object|encoding",["summary","Inspect the internal encoding of a Redis object","since","2.2.3","group","generic","complexity","O(1)","arguments",[["name","key","type","key","key_spec_index",0]]],"object|freq",["summary","Get the logarithmic access frequency counter of a Redis object","since","4.0.0","group","generic","complexity","O(1)","arguments",[["name","key","type","key","key_spec_index",0]]]]],"hscan",["summary","Incrementally iterate hash fields and associated values","since","2.8.0","group","hash","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","key_spec_index",0],["name","cursor","type","integer"],["name","pattern","type","pattern","token","MATCH","flags",["optional"]],["name","count","type","integer","token","COUNT","flags",["optional"]]]],"slowlog",["summary","A container for slow log commands","since","2.2.12","group","server","complexity","Depends on subcommand.","subcommands",["slowlog|len",["summary","Get the slow log's length","since","2.2.12","group","server","complexity","O(1)"],"slowlog|help",["summary","Show helpful text about the different subcommands","since","6.2.0","group","server","complexity","O(1)"],"slowlog|get",["summary","Get the slow log's entries","since","2.2.12","group","server","complexity","O(N) where N is the number of entries returned","history",[["4.0.0","Added client IP address, port and name to the reply."]],"arguments",[["name","count","type","integer","flags",["optional"]]]],"slowlog|reset",["summary","Clear all entries from the slow log","since","2.2.12","group","server","complexity","O(N) where N is the number of entries in the slowlog"]]],"zrandmember",["summary","Get one or multiple random elements from a sorted set","since","6.2.0","group","sorted-set","complexity","O(N) where N is the number of elements returned","arguments",[["name","key","type","key","key_spec_index",0],["name","options","type","block","flags",["optional"],"arguments",[["name","count","type","integer"],["name","withscores","type","pure-token","token","WITHSCORES","flags",["optional"]]]]]],"wait",["summary","Wait for the synchronous replication of all the write commands sent in the context of the current connection","since","3.0.0","group","generic","complexity","O(1)","arguments",[["name","numreplicas","type","integer"],["name","timeout","type","integer"]]],"expireat",["summary","Set the expiration for a key as a UNIX timestamp","since","1.2.0","group","generic","complexity","O(1)","history",[["7.0.0","Added options: `NX`, `XX`, `GT` and `LT`."]],"arguments",[["name","key","type","key","key_spec_index",0],["name","unix-time-seconds","type","unix-time"],["name","condition","type","oneof","since","7.0.0","flags",["optional"],"arguments",[["name","nx","type","pure-token","token","NX"],["name","xx","type","pure-token","token","XX"],["name","gt","type","pure-token","token","GT"],["name","lt","type","pure-token","token","LT"]]]]],"hincrbyfloat",["summary","Increment the float value of a hash field by the given amount","since","2.6.0","group","hash","complexity","O(1)","arguments",[["name","key","type","key","key_spec_index",0],["name","field","type","string"],["name","increment","type","double"]]],"georadius",["summary","Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a point","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`."]],"arguments",[["name","key","type","key","key_spec_index",0],["name","longitude","type","double"],["name","latitude","type","double"],["name","radius","type","double"],["name","unit","type","oneof","arguments",[["name","m","type","pure-token","token","M"],["name","km","type","pure-token","token","KM"],["name","ft","type","pure-token","token","FT"],["name","mi","type","pure-token","token","MI"]]],["name","withcoord","type","pure-token","token","WITHCOORD","flags",["optional"]],["name","withdist","type","pure-token","token","WITHDIST","flags",["optional"]],["name","withhash","type","pure-token","token","WITHHASH","flags",["optional"]],["name","count","type","block","flags",["optional"],"arguments",[["name","count","type","integer","token","COUNT"],["name","any","type","pure-token","token","ANY","since","6.2.0","flags",["optional"]]]],["name","order","type","oneof","flags",["optional"],"arguments",[["name","asc","type","pure-token","token","ASC"],["name","desc","type","pure-token","token","DESC"]]],["name","key","type","key","key_spec_index",1,"token","STORE","flags",["optional"]],["name","key","type","key","key_spec_index",2,"token","STOREDIST","flags",["optional"]]]],"blpop",["summary","Remove and get the first element in a list, or block until one is available","since","2.0.0","group","list","complexity","O(N) where N is the number of provided keys.","history",[["6.0.0","`timeout` is interpreted as a double instead of an integer."]],"arguments",[["name","key","type","key","key_spec_index",0,"flags",["multiple"]],["name","timeout","type","double"]]],"exists",["summary","Determine if a key exists","since","1.0.0","group","generic","complexity","O(N) where N is the number of keys to check.","history",[["3.0.3","Accepts multiple `key` arguments."]],"arguments",[["name","key","type","key","key_spec_index",0,"flags",["multiple"]]]],"rpushx",["summary","Append an element to a list, only if 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","key_spec_index",0],["name","element","type","string","flags",["multiple"]]]],"geodist",["summary","Returns the distance between two members of a geospatial index","since","3.2.0","group","geo","complexity","O(log(N))","arguments",[["name","key","type","key","key_spec_index",0],["name","member1","type","string"],["name","member2","type","string"],["name","unit","type","oneof","flags",["optional"],"arguments",[["name","m","type","pure-token","token","M"],["name","km","type","pure-token","token","KM"],["name","ft","type","pure-token","token","FT"],["name","mi","type","pure-token","token","MI"]]]]],"type",["summary","Determine the type stored at key","since","1.0.0","group","generic","complexity","O(1)","arguments",[["name","key","type","key","key_spec_index",0]]],"failover",["summary","Start a coordinated failover between this server and one of its replicas.","since","6.2.0","group","server","complexity","O(1)","arguments",[["name","target","type","block","token","TO","flags",["optional"],"arguments",[["name","host","type","string"],["name","port","type","integer"],["name","force","type","pure-token","token","FORCE","flags",["optional"]]]],["name","abort","type","pure-token","token","ABORT","flags",["optional"]],["name","milliseconds","type","integer","token","TIMEOUT","flags",["optional"]]]],"unlink",["summary","Delete a key asynchronously in another thread. Otherwise it is just as DEL, but non blocking.","since","4.0.0","group","generic","complexity","O(1) for each key removed regardless of its size. Then the command does O(N) work in a different thread in order to reclaim memory, where N is the number of allocations the deleted objects where composed of.","arguments",[["name","key","type","key","key_spec_index",0,"flags",["multiple"]]]],"xrevrange",["summary","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","since","5.0.0","group","stream","complexity","O(N) with N being the number of elements returned. If N is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1).","history",[["6.2.0","Added exclusive ranges."]],"arguments",[["name","key","type","key","key_spec_index",0],["name","end","type","string"],["name","start","type","string"],["name","count","type","integer","token","COUNT","flags",["optional"]]]],"xgroup",["summary","A container for consumer groups commands","since","5.0.0","group","stream","complexity","Depends on subcommand.","subcommands",["xgroup|destroy",["summary","Destroy a consumer group.","since","5.0.0","group","stream","complexity","O(N) where N is the number of entries in the group's pending entries list (PEL).","arguments",[["name","key","type","key","key_spec_index",0],["name","groupname","type","string"]]],"xgroup|createconsumer",["summary","Create a consumer in a consumer group.","since","6.2.0","group","stream","complexity","O(1)","arguments",[["name","key","type","key","key_spec_index",0],["name","groupname","type","string"],["name","consumername","type","string"]]],"xgroup|create",["summary","Create a consumer group.","since","5.0.0","group","stream","complexity","O(1)","history",[["7.0.0","Added the `entries_read` named argument."]],"arguments",[["name","key","type","key","key_spec_index",0],["name","groupname","type","string"],["name","id","type","oneof","arguments",[["name","id","type","string"],["name","new_id","type","pure-token","token","$"]]],["name","mkstream","type","pure-token","token","MKSTREAM","flags",["optional"]],["name","entries_read","type","integer","token","ENTRIESREAD","flags",["optional"]]]],"xgroup|delconsumer",["summary","Delete a consumer from a consumer group.","since","5.0.0","group","stream","complexity","O(1)","arguments",[["name","key","type","key","key_spec_index",0],["name","groupname","type","string"],["name","consumername","type","string"]]],"xgroup|help",["summary","Show helpful text about the different subcommands","since","5.0.0","group","stream","complexity","O(1)"],"xgroup|setid",["summary","Set a consumer group to an arbitrary last delivered ID value.","since","5.0.0","group","stream","complexity","O(1)","history",[["7.0.0","Added the optional `entries_read` argument."]],"arguments",[["name","key","type","key","key_spec_index",0],["name","groupname","type","string"],["name","id","type","oneof","arguments",[["name","id","type","string"],["name","new_id","type","pure-token","token","$"]]],["name","entries_read","type","integer","token","ENTRIESREAD","flags",["optional"]]]]]],"zrevrangebylex",["summary","Return a range of members in a sorted set, by lexicographical range, ordered from higher to lower strings.","since","2.8.9","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 being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)).","doc_flags",["deprecated"],"deprecated_since","6.2.0","replaced_by","`ZRANGE` with the `REV` and `BYLEX` arguments","arguments",[["name","key","type","key","key_spec_index",0],["name","max","type","string"],["name","min","type","string"],["name","offset_count","type","block","token","LIMIT","flags",["optional"],"arguments",[["name","offset","type","integer"],["name","count","type","integer"]]]]],"setrange",["summary","Overwrite part of a string at key starting at the specified offset","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","key_spec_index",0],["name","offset","type","integer"],["name","value","type","string"]]],"hello",["summary","Handshake with Redis","since","6.0.0","group","connection","complexity","O(1)","history",[["6.2.0","`protover` made optional; when called without arguments the command reports the current connection's context."]],"arguments",[["name","arguments","type","block","flags",["optional"],"arguments",[["name","protover","type","integer"],["name","username_password","type","block","token","AUTH","flags",["optional"],"arguments",[["name","username","type","string"],["name","password","type","string"]]],["name","clientname","type","string","token","SETNAME","flags",["optional"]]]]]],"xread",["summary","Return never seen elements in multiple streams, with IDs greater than the ones reported by the caller for each stream. Can block.","since","5.0.0","group","stream","complexity","For each stream mentioned: O(N) with N being the number of elements being returned, it means that XREAD-ing with a fixed COUNT is O(1). Note that when the BLOCK option is used, XADD will pay O(M) time in order to serve the M clients blocked on the stream getting new data.","arguments",[["name","count","type","integer","token","COUNT","flags",["optional"]],["name","milliseconds","type","integer","token","BLOCK","flags",["optional"]],["name","streams","type","block","token","STREAMS","arguments",[["name","key","type","key","key_spec_index",0,"flags",["multiple"]],["name","id","type","string","flags",["multiple"]]]]]],"lrem",["summary","Remove elements from a list","since","1.0.0","group","list","complexity","O(N+M) where N is the length of the list and M is the number of elements removed.","arguments",[["name","key","type","key","key_spec_index",0],["name","count","type","integer"],["name","element","type","string"]]],"memory",["summary","A container for memory diagnostics commands","since","4.0.0","group","server","complexity","Depends on subcommand.","subcommands",["memory|malloc-stats",["summary","Show allocator internal stats","since","4.0.0","group","server","complexity","Depends on how much memory is allocated, could be slow"],"memory|purge",["summary","Ask the allocator to release memory","since","4.0.0","group","server","complexity","Depends on how much memory is allocated, could be slow"],"memory|doctor",["summary","Outputs memory problems report","since","4.0.0","group","server","complexity","O(1)"],"memory|usage",["summary","Estimate 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","key_spec_index",0],["name","count","type","integer","token","SAMPLES","flags",["optional"]]]],"memory|help",["summary","Show helpful text about the different subcommands","since","4.0.0","group","server","complexity","O(1)"],"memory|stats",["summary","Show memory usage details","since","4.0.0","group","server","complexity","O(1)"]]],"pexpireat",["summary","Set the expiration for a key as a UNIX timestamp specified in milliseconds","since","2.6.0","group","generic","complexity","O(1)","history",[["7.0.0","Added options: `NX`, `XX`, `GT` and `LT`."]],"arguments",[["name","key","type","key","key_spec_index",0],["name","unix-time-milliseconds","type","unix-time"],["name","condition","type","oneof","since","7.0.0","flags",["optional"],"arguments",[["name","nx","type","pure-token","token","NX"],["name","xx","type","pure-token","token","XX"],["name","gt","type","pure-token","token","GT"],["name","lt","type","pure-token","token","LT"]]]]],"pfdebug",["summary","Internal commands for debugging HyperLogLog values","since","2.8.9","group","hyperloglog","complexity","N/A","doc_flags",["syscmd"]],"rpush",["summary","Append one or multiple elements to a list","since","1.0.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",[["2.4.0","Accepts multiple `element` arguments."]],"arguments",[["name","key","type","key","key_spec_index",0],["name","element","type","string","flags",["multiple"]]]],"linsert",["summary","Insert an element before or after another element in a list","since","2.2.0","group","list","complexity","O(N) where N is the number of elements to traverse before seeing the value pivot. This means that inserting somewhere on the left end on the list (head) can be considered O(1) and inserting somewhere on the right end (tail) is O(N).","arguments",[["name","key","type","key","key_spec_index",0],["name","where","type","oneof","arguments",[["name","before","type","pure-token","token","BEFORE"],["name","after","type","pure-token","token","AFTER"]]],["name","pivot","type","string"],["name","element","type","string"]]],"mget",["summary","Get the values of all the given keys","since","1.0.0","group","string","complexity","O(N) where N is the number of keys to retrieve.","arguments",[["name","key","type","key","key_spec_index",0,"flags",["multiple"]]]],"zinter",["summary","Intersect multiple sorted sets","since","6.2.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","numkeys","type","integer"],["name","key","type","key","key_spec_index",0,"flags",["multiple"]],["name","weight","type","integer","token","WEIGHTS","flags",["optional","multiple"]],["name","aggregate","type","oneof","token","AGGREGATE","flags",["optional"],"arguments",[["name","sum","type","pure-token","token","SUM"],["name","min","type","pure-token","token","MIN"],["name","max","type","pure-token","token","MAX"]]],["name","withscores","type","pure-token","token","WITHSCORES","flags",["optional"]]]],"unwatch",["summary","Forget about all watched keys","since","2.2.0","group","transactions","complexity","O(1)"],"hstrlen",["summary","Get the length of the value of a hash field","since","3.2.0","group","hash","complexity","O(1)","arguments",[["name","key","type","key","key_spec_index",0],["name","field","type","string"]]],"sort_ro",["summary","Sort the elements in a list, set or sorted set. Read-only variant of SORT.","since","7.0.0","group","generic","complexity","O(N+M*log(M)) where N is the number of elements in the list or set to sort, and M the number of returned elements. When the elements are not sorted, complexity is O(N).","arguments",[["name","key","type","key","key_spec_index",0],["name","pattern","type","pattern","key_spec_index",1,"token","BY","flags",["optional"]],["name","offset_count","type","block","token","LIMIT","flags",["optional"],"arguments",[["name","offset","type","integer"],["name","count","type","integer"]]],["name","pattern","type","pattern","key_spec_index",1,"token","GET","flags",["optional","multiple","multiple_token"]],["name","order","type","oneof","flags",["optional"],"arguments",[["name","asc","type","pure-token","token","ASC"],["name","desc","type","pure-token","token","DESC"]]],["name","sorting","type","pure-token","token","ALPHA","flags",["optional"]]]],"punsubscribe",["summary","Stop listening for messages posted to channels matching the given patterns","since","2.0.0","group","pubsub","complexity","O(N+M) where N is the number of patterns the client is already subscribed and M is the number of total patterns subscribed in the system (by any client).","arguments",[["name","pattern","type","pattern","flags",["optional","multiple"]]]],"xdel",["summary","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.","since","5.0.0","group","stream","complexity","O(1) for each single item to delete in the stream, regardless of the stream size.","arguments",[["name","key","type","key","key_spec_index",0],["name","id","type","string","flags",["multiple"]]]],"monitor",["summary","Listen for all requests received by the server in real time","since","1.0.0","group","server"],"lpushx",["summary","Prepend an element to a list, only if 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","key_spec_index",0],["name","element","type","string","flags",["multiple"]]]],"lmpop",["summary","Pop elements from a list","since","7.0.0","group","list","complexity","O(N+M) where N is the number of provided keys and M is the number of elements returned.","arguments",[["name","numkeys","type","integer"],["name","key","type","key","key_spec_index",0,"flags",["multiple"]],["name","where","type","oneof","arguments",[["name","left","type","pure-token","token","LEFT"],["name","right","type","pure-token","token","RIGHT"]]],["name","count","type","integer","token","COUNT","flags",["optional"]]]],"time",["summary","Return the current server time","since","2.6.0","group","server","complexity","O(1)"],"pubsub",["summary","A container for Pub/Sub commands","since","2.8.0","group","pubsub","complexity","Depends on subcommand.","subcommands",["pubsub|channels",["summary","List active channels","since","2.8.0","group","pubsub","complexity","O(N) where N is the number of active channels, and assuming constant time pattern matching (relatively short channels and patterns)","arguments",[["name","pattern","type","pattern","flags",["optional"]]]],"pubsub|shardnumsub",["summary","Get the count of subscribers for shard channels","since","7.0.0","group","pubsub","complexity","O(N) for the SHARDNUMSUB subcommand, where N is the number of requested channels","arguments",[["name","channel","type","string","flags",["optional","multiple"]]]],"pubsub|help",["summary","Show helpful text about the different subcommands","since","6.2.0","group","pubsub","complexity","O(1)"],"pubsub|numpat",["summary","Get the count of unique patterns pattern subscriptions","since","2.8.0","group","pubsub","complexity","O(1)"],"pubsub|numsub",["summary","Get the count of subscribers for channels","since","2.8.0","group","pubsub","complexity","O(N) for the NUMSUB subcommand, where N is the number of requested channels","arguments",[["name","channel","type","string","flags",["optional","multiple"]]]],"pubsub|shardchannels",["summary","List active shard channels","since","7.0.0","group","pubsub","complexity","O(N) where N is the number of active shard channels, and assuming constant time pattern matching (relatively short channels).","arguments",[["name","pattern","type","pattern","flags",["optional"]]]]]],"client",["summary","A container for client connection commands","since","2.4.0","group","connection","complexity","Depends on subcommand.","subcommands",["client|getname",["summary","Get the current connection name","since","2.6.9","group","connection","complexity","O(1)"],"client|list",["summary","Get the list of client 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.2.0","Added `laddr` field and the optional `ID` filter."]],"arguments",[["name","normal_master_replica_pubsub","type","oneof","token","TYPE","since","5.0.0","flags",["optional"],"arguments",[["name","normal","type","pure-token","token","NORMAL"],["name","master","type","pure-token","token","MASTER"],["name","replica","type","pure-token","token","REPLICA"],["name","pubsub","type","pure-token","token","PUBSUB"]]],["name","id","type","block","token","ID","since","6.2.0","flags",["optional"],"arguments",[["name","client-id","type","integer","flags",["multiple"]]]]]],"client|kill",["summary","Kill the connection of a client","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","ip:port","type","string","flags",["optional"]],["name","client-id","type","integer","token","ID","since","2.8.12","flags",["optional"]],["name","normal_master_slave_pubsub","type","oneof","token","TYPE","since","2.8.12","flags",["optional"],"arguments",[["name","normal","type","pure-token","token","NORMAL"],["name","master","type","pure-token","token","MASTER","since","3.2.0"],["name","slave","type","pure-token","token","SLAVE"],["name","replica","type","pure-token","token","REPLICA","since","5.0.0"],["name","pubsub","type","pure-token","token","PUBSUB"]]],["name","username","type","string","token","USER","flags",["optional"]],["name","ip:port","type","string","token","ADDR","flags",["optional"]],["name","ip:port","type","string","token","LADDR","since","6.2.0","flags",["optional"]],["name","yes/no","type","string","token","SKIPME","flags",["optional"]]]],"client|id",["summary","Returns the client ID for the current connection","since","5.0.0","group","connection","complexity","O(1)"],"client|help",["summary","Show helpful text about the different subcommands","since","5.0.0","group","connection","complexity","O(1)"],"client|no-evict",["summary","Set client eviction mode for the current connection","since","7.0.0","group","connection","complexity","O(1)","arguments",[["name","enabled","type","oneof","arguments",[["name","on","type","pure-token","token","ON"],["name","off","type","pure-token","token","OFF"]]]]],"client|caching",["summary","Instruct the server about tracking or not 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","token","YES"],["name","no","type","pure-token","token","NO"]]]]],"client|trackinginfo",["summary","Return information about server assisted client side caching for the current connection","since","6.2.0","group","connection","complexity","O(1)"],"client|setname",["summary","Set the current connection name","since","2.6.9","group","connection","complexity","O(1)","arguments",[["name","connection-name","type","string"]]],"client|pause",["summary","Stop processing commands from clients for some time","since","2.9.50","group","connection","complexity","O(1)","history",[["6.2.0","`CLIENT PAUSE WRITE` mode added along with the `mode` option."]],"arguments",[["name","timeout","type","integer"],["name","mode","type","oneof","since","6.2.0","flags",["optional"],"arguments",[["name","write","type","pure-token","token","WRITE"],["name","all","type","pure-token","token","ALL"]]]]],"client|reply",["summary","Instruct the server whether to reply to commands","since","3.2.0","group","connection","complexity","O(1)","arguments",[["name","on_off_skip","type","oneof","arguments",[["name","on","type","pure-token","token","ON"],["name","off","type","pure-token","token","OFF"],["name","skip","type","pure-token","token","SKIP"]]]]],"client|unpause",["summary","Resume processing of clients that were paused","since","6.2.0","group","connection","complexity","O(N) Where N is the number of paused clients"],"client|unblock",["summary","Unblock a client blocked in 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"],["name","timeout_error","type","oneof","flags",["optional"],"arguments",[["name","timeout","type","pure-token","token","TIMEOUT"],["name","error","type","pure-token","token","ERROR"]]]]],"client|info",["summary","Returns information about the current client connection.","since","6.2.0","group","connection","complexity","O(1)"],"client|tracking",["summary","Enable or disable server assisted client side caching support","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","token","ON"],["name","off","type","pure-token","token","OFF"]]],["name","client-id","type","integer","token","REDIRECT","flags",["optional"]],["name","prefix","type","string","token","PREFIX","flags",["optional","multiple","multiple_token"]],["name","bcast","type","pure-token","token","BCAST","flags",["optional"]],["name","optin","type","pure-token","token","OPTIN","flags",["optional"]],["name","optout","type","pure-token","token","OPTOUT","flags",["optional"]],["name","noloop","type","pure-token","token","NOLOOP","flags",["optional"]]]],"client|getredir",["summary","Get tracking notifications redirection client ID if any","since","6.0.0","group","connection","complexity","O(1)"]]],"evalsha_ro",["summary","Execute a read-only Lua script server side","since","7.0.0","group","scripting","complexity","Depends on the script that is executed.","arguments",[["name","sha1","type","string"],["name","numkeys","type","integer"],["name","key","type","key","key_spec_index",0,"flags",["multiple"]],["name","arg","type","string","flags",["multiple"]]]],"hset",["summary","Set the string value of a hash field","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","key_spec_index",0],["name","field_value","type","block","flags",["multiple"],"arguments",[["name","field","type","str