UNPKG

ioredis-mock

Version:

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

1 lines 185 kB
["hello",["summary","Handshakes with the Redis server.","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","display_text","protover"],["name","auth","type","block","token","AUTH","flags",["optional"],"arguments",[["name","username","type","string","display_text","username"],["name","password","type","string","display_text","password"]]],["name","clientname","type","string","display_text","clientname","token","SETNAME","flags",["optional"]]]]]],"bf.loadchunk",["group","module","module","bf"],"hincrbyfloat",["summary","Increments the floating point value of a field by a number. Uses 0 as initial value if the field doesn't exist.","since","2.6.0","group","hash","complexity","O(1)","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","field","type","string","display_text","field"],["name","increment","type","double","display_text","increment"]]],"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"]]],"pexpireat",["summary","Sets the expiration time of a key to a Unix milliseconds timestamp.","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","display_text","key","key_spec_index",0],["name","unix-time-milliseconds","type","unix-time","display_text","unix-time-milliseconds"],["name","condition","type","oneof","since","7.0.0","flags",["optional"],"arguments",[["name","nx","type","pure-token","display_text","nx","token","NX"],["name","xx","type","pure-token","display_text","xx","token","XX"],["name","gt","type","pure-token","display_text","gt","token","GT"],["name","lt","type","pure-token","display_text","lt","token","LT"]]]]],"hsetex",["summary","Set the value of one or more fields of a given hash key, and optionally set their expiration.","since","8.0.0","group","hash","complexity","O(N) where N is the number of fields being set.","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","condition","type","oneof","flags",["optional"],"arguments",[["name","fnx","type","pure-token","display_text","fnx","token","FNX"],["name","fxx","type","pure-token","display_text","fxx","token","FXX"]]],["name","expiration","type","oneof","flags",["optional"],"arguments",[["name","seconds","type","integer","display_text","seconds","token","EX"],["name","milliseconds","type","integer","display_text","milliseconds","token","PX"],["name","unix-time-seconds","type","unix-time","display_text","unix-time-seconds","token","EXAT"],["name","unix-time-milliseconds","type","unix-time","display_text","unix-time-milliseconds","token","PXAT"],["name","keepttl","type","pure-token","display_text","keepttl","token","KEEPTTL"]]],["name","fields","type","block","token","FIELDS","arguments",[["name","numfields","type","integer","display_text","numfields"],["name","data","type","block","flags",["multiple"],"arguments",[["name","field","type","string","display_text","field"],["name","value","type","string","display_text","value"]]]]]]],"function",["summary","A container for function commands.","since","7.0.0","group","scripting","complexity","Depends on subcommand.","subcommands",["function|delete",["summary","Deletes a library and its functions.","since","7.0.0","group","scripting","complexity","O(1)","arguments",[["name","library-name","type","string","display_text","library-name"]]],"function|flush",["summary","Deletes all libraries and functions.","since","7.0.0","group","scripting","complexity","O(N) where N is the number of functions deleted","arguments",[["name","flush-type","type","oneof","flags",["optional"],"arguments",[["name","async","type","pure-token","display_text","async","token","ASYNC"],["name","sync","type","pure-token","display_text","sync","token","SYNC"]]]]],"function|kill",["summary","Terminates a function during execution.","since","7.0.0","group","scripting","complexity","O(1)"],"function|load",["summary","Creates a library.","since","7.0.0","group","scripting","complexity","O(1) (considering compilation time is redundant)","arguments",[["name","replace","type","pure-token","display_text","replace","token","REPLACE","flags",["optional"]],["name","function-code","type","string","display_text","function-code"]]],"function|help",["summary","Returns helpful text about the different subcommands.","since","7.0.0","group","scripting","complexity","O(1)"],"function|dump",["summary","Dumps all libraries into a serialized binary payload.","since","7.0.0","group","scripting","complexity","O(N) where N is the number of functions"],"function|stats",["summary","Returns information about a function during execution.","since","7.0.0","group","scripting","complexity","O(1)"],"function|list",["summary","Returns information about all libraries.","since","7.0.0","group","scripting","complexity","O(N) where N is the number of functions","arguments",[["name","library-name-pattern","type","string","display_text","library-name-pattern","token","LIBRARYNAME","flags",["optional"]],["name","withcode","type","pure-token","display_text","withcode","token","WITHCODE","flags",["optional"]]]],"function|restore",["summary","Restores all libraries from a payload.","since","7.0.0","group","scripting","complexity","O(N) where N is the number of functions on the payload","arguments",[["name","serialized-value","type","string","display_text","serialized-value"],["name","policy","type","oneof","flags",["optional"],"arguments",[["name","flush","type","pure-token","display_text","flush","token","FLUSH"],["name","append","type","pure-token","display_text","append","token","APPEND"],["name","replace","type","pure-token","display_text","replace","token","REPLACE"]]]]]]],"lastsave",["summary","Returns the Unix timestamp of the last successful save to disk.","since","1.0.0","group","server","complexity","O(1)"],"topk.add",["group","module","module","bf"],"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"]]],"json.get",["group","module","module","ReJSON"],"tdigest.quantile",["group","module","module","bf"],"hexpire",["summary","Set expiry for hash field using relative time to expire (seconds)","since","7.4.0","group","hash","complexity","O(N) where N is the number of specified fields","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","seconds","type","integer","display_text","seconds"],["name","condition","type","oneof","flags",["optional"],"arguments",[["name","nx","type","pure-token","display_text","nx","token","NX"],["name","xx","type","pure-token","display_text","xx","token","XX"],["name","gt","type","pure-token","display_text","gt","token","GT"],["name","lt","type","pure-token","display_text","lt","token","LT"]]],["name","fields","type","block","token","FIELDS","arguments",[["name","numfields","type","integer","display_text","numfields"],["name","field","type","string","display_text","field","flags",["multiple"]]]]]],"expiretime",["summary","Returns the expiration time of a key as a Unix timestamp.","since","7.0.0","group","generic","complexity","O(1)","arguments",[["name","key","type","key","display_text","key","key_spec_index",0]]],"acl",["summary","A container for Access List Control commands.","since","6.0.0","group","server","complexity","Depends on subcommand.","subcommands",["acl|log",["summary","Lists recent security events generated due to ACL rules.","since","6.0.0","group","server","complexity","O(N) with N being the number of entries shown.","history",[["7.2.0","Added entry ID, timestamp created, and timestamp last updated."]],"arguments",[["name","operation","type","oneof","flags",["optional"],"arguments",[["name","count","type","integer","display_text","count"],["name","reset","type","pure-token","display_text","reset","token","RESET"]]]]],"acl|dryrun",["summary","Simulates the execution of a command by a user, without executing the command.","since","7.0.0","group","server","complexity","O(1).","arguments",[["name","username","type","string","display_text","username"],["name","command","type","string","display_text","command"],["name","arg","type","string","display_text","arg","flags",["optional","multiple"]]]],"acl|load",["summary","Reloads the rules from the configured ACL file.","since","6.0.0","group","server","complexity","O(N). Where N is the number of configured users."],"acl|cat",["summary","Lists the ACL categories, or the commands inside a category.","since","6.0.0","group","server","complexity","O(1) since the categories and commands are a fixed set.","arguments",[["name","category","type","string","display_text","category","flags",["optional"]]]],"acl|help",["summary","Returns helpful text about the different subcommands.","since","6.0.0","group","server","complexity","O(1)"],"acl|save",["summary","Saves the effective ACL rules in the configured ACL file.","since","6.0.0","group","server","complexity","O(N). Where N is the number of configured users."],"acl|whoami",["summary","Returns the authenticated username of the current connection.","since","6.0.0","group","server","complexity","O(1)"],"acl|genpass",["summary","Generates a pseudorandom, secure password that can be used to identify ACL users.","since","6.0.0","group","server","complexity","O(1)","arguments",[["name","bits","type","integer","display_text","bits","flags",["optional"]]]],"acl|list",["summary","Dumps the effective rules in ACL file format.","since","6.0.0","group","server","complexity","O(N). Where N is the number of configured users."],"acl|setuser",["summary","Creates and modifies an ACL user and its rules.","since","6.0.0","group","server","complexity","O(N). Where N is the number of rules provided.","history",[["6.2.0","Added Pub/Sub channel patterns."],["7.0.0","Added selectors and key based permissions."]],"arguments",[["name","username","type","string","display_text","username"],["name","rule","type","string","display_text","rule","flags",["optional","multiple"]]]],"acl|deluser",["summary","Deletes ACL users, and terminates their connections.","since","6.0.0","group","server","complexity","O(1) amortized time considering the typical user.","arguments",[["name","username","type","string","display_text","username","flags",["multiple"]]]],"acl|getuser",["summary","Lists the ACL rules of a user.","since","6.0.0","group","server","complexity","O(N). Where N is the number of password, command and pattern rules that the user has.","history",[["6.2.0","Added Pub/Sub channel patterns."],["7.0.0","Added selectors and changed the format of key and channel patterns from a list to their rule representation."]],"arguments",[["name","username","type","string","display_text","username"]]],"acl|users",["summary","Lists all ACL users.","since","6.0.0","group","server","complexity","O(N). Where N is the number of configured users."]]],"smembers",["summary","Returns all members of a set.","since","1.0.0","group","set","complexity","O(N) where N is the set cardinality.","arguments",[["name","key","type","key","display_text","key","key_spec_index",0]]],"zscore",["summary","Returns the score of a member in a sorted set.","since","1.2.0","group","sorted-set","complexity","O(1)","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","member","type","string","display_text","member"]]],"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"]]]],"shutdown",["summary","Synchronously saves the database(s) to disk and shuts down the Redis 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","save-selector","type","oneof","flags",["optional"],"arguments",[["name","nosave","type","pure-token","display_text","nosave","token","NOSAVE"],["name","save","type","pure-token","display_text","save","token","SAVE"]]],["name","now","type","pure-token","display_text","now","token","NOW","since","7.0.0","flags",["optional"]],["name","force","type","pure-token","display_text","force","token","FORCE","since","7.0.0","flags",["optional"]],["name","abort","type","pure-token","display_text","abort","token","ABORT","since","7.0.0","flags",["optional"]]]],"FT.EXPLAIN",["group","module","module","search"],"hrandfield",["summary","Returns one or more random fields from a hash.","since","6.2.0","group","hash","complexity","O(N) where N is the number of fields returned","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","options","type","block","flags",["optional"],"arguments",[["name","count","type","integer","display_text","count"],["name","withvalues","type","pure-token","display_text","withvalues","token","WITHVALUES","flags",["optional"]]]]]],"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]]],"sort",["summary","Sorts the elements in a list, a set, or a sorted set, optionally storing the result.","since","1.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","display_text","key","key_spec_index",0],["name","by-pattern","type","pattern","display_text","pattern","key_spec_index",1,"token","BY","flags",["optional"]],["name","limit","type","block","token","LIMIT","flags",["optional"],"arguments",[["name","offset","type","integer","display_text","offset"],["name","count","type","integer","display_text","count"]]],["name","get-pattern","type","pattern","display_text","pattern","key_spec_index",1,"token","GET","flags",["optional","multiple","multiple_token"]],["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","sorting","type","pure-token","display_text","sorting","token","ALPHA","flags",["optional"]],["name","destination","type","key","display_text","destination","key_spec_index",2,"token","STORE","flags",["optional"]]]],"echo",["summary","Returns the given string.","since","1.0.0","group","connection","complexity","O(1)","arguments",[["name","message","type","string","display_text","message"]]],"incr",["summary","Increments the integer value of a key by one. Uses 0 as initial value if the key doesn't exist.","since","1.0.0","group","string","complexity","O(1)","arguments",[["name","key","type","key","display_text","key","key_spec_index",0]]],"_FT.CONFIG",["group","module","module","search"],"restore-asking",["summary","An internal command for migrating keys in a cluster.","since","3.0.0","group","server","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)).","doc_flags",["syscmd"],"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"]]]],"bf.info",["group","module","module","bf"],"georadius_ro",["summary","Returns members from a geospatial index that are within a distance from a coordinate.","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` 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"]]]]],"ts.mrevrange",["group","module","module","timeseries"],"dbsize",["summary","Returns the number of keys in the database.","since","1.0.0","group","server","complexity","O(1)"],"_FT.DEBUG",["group","module","module","search","subcommands",["_FT.DEBUG|GC_CONTINUE_SCHEDULE",["group","module","module","search"],"_FT.DEBUG|INDEXES",["group","module","module","search"],"_FT.DEBUG|DUMP_PHONETIC_HASH",["group","module","module","search"],"_FT.DEBUG|DUMP_NUMIDXTREE",["group","module","module","search"],"_FT.DEBUG|DUMP_TAGIDX",["group","module","module","search"],"_FT.DEBUG|TTL",["group","module","module","search"],"_FT.DEBUG|RESUME_TOPOLOGY_UPDATER",["group","module","module","search"],"_FT.DEBUG|GC_WAIT_FOR_JOBS",["group","module","module","search"],"_FT.DEBUG|TTL_EXPIRE",["group","module","module","search"],"_FT.DEBUG|SET_MONITOR_EXPIRATION",["group","module","module","search"],"_FT.DEBUG|IDTODOCID",["group","module","module","search"],"_FT.DEBUG|YIELDS_ON_LOAD_COUNTER",["group","module","module","search"],"_FT.DEBUG|HELP",["group","module","module","search"],"_FT.DEBUG|FT.AGGREGATE",["group","module","module","search"],"_FT.DEBUG|PAUSE_TOPOLOGY_UPDATER",["group","module","module","search"],"_FT.DEBUG|DUMP_SUFFIX_TRIE",["group","module","module","search"],"_FT.DEBUG|CLEAR_PENDING_TOPOLOGY",["group","module","module","search"],"_FT.DEBUG|DUMP_TERMS",["group","module","module","search"],"_FT.DEBUG|NUMIDX_SUMMARY",["group","module","module","search"],"_FT.DEBUG|DUMP_GEOMIDX",["group","module","module","search"],"_FT.DEBUG|GC_CLEAN_NUMERIC",["group","module","module","search"],"_FT.DEBUG|DUMP_PREFIX_TRIE",["group","module","module","search"],"_FT.DEBUG|FT.SEARCH",["group","module","module","search"],"_FT.DEBUG|GC_FORCEINVOKE",["group","module","module","search"],"_FT.DEBUG|VECSIM_INFO",["group","module","module","search"],"_FT.DEBUG|INFO",["group","module","module","search"],"_FT.DEBUG|WORKERS",["group","module","module","search"],"_FT.DEBUG|DOCINFO",["group","module","module","search"],"_FT.DEBUG|BG_SCAN_CONTROLLER",["group","module","module","search"],"_FT.DEBUG|GC_STOP_SCHEDULE",["group","module","module","search"],"_FT.DEBUG|GIT_SHA",["group","module","module","search"],"_FT.DEBUG|INVIDX_SUMMARY",["group","module","module","search"],"_FT.DEBUG|GC_FORCEBGINVOKE",["group","module","module","search"],"_FT.DEBUG|DUMP_NUMIDX",["group","module","module","search"],"_FT.DEBUG|SPEC_INVIDXES_INFO",["group","module","module","search"],"_FT.DEBUG|_FT.SEARCH",["group","module","module","search"],"_FT.DEBUG|DELETE_LOCAL_CURSORS",["group","module","module","search"],"_FT.DEBUG|TTL_PAUSE",["group","module","module","search"],"_FT.DEBUG|INFO_TAGIDX",["group","module","module","search"],"_FT.DEBUG|GET_HIDE_USER_DATA_FROM_LOGS",["group","module","module","search"],"_FT.DEBUG|DUMP_HNSW",["group","module","module","search"],"_FT.DEBUG|DOCIDTOID",["group","module","module","search"],"_FT.DEBUG|SHARD_CONNECTION_STATES",["group","module","module","search"],"_FT.DEBUG|_FT.AGGREGATE",["group","module","module","search"],"_FT.DEBUG|DUMP_INVIDX",["group","module","module","search"]]],"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"]]],"zpopmax",["summary","Returns the highest-scoring members from a sorted set after removing them. Deletes the sorted set if the last member was popped.","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","display_text","key","key_spec_index",0],["name","count","type","integer","display_text","count","flags",["optional"]]]],"mget",["summary","Atomically returns the string values of one or more keys.","since","1.0.0","group","string","complexity","O(N) where N is the number of keys to retrieve.","arguments",[["name","key","type","key","display_text","key","key_spec_index",0,"flags",["multiple"]]]],"json.numincrby",["group","module","module","ReJSON"],"geoadd",["summary","Adds one or more members to a geospatial index. The key is created if it doesn't exist.","since","3.2.0","group","geo","complexity","O(log(N)) for each item added, where N is the number of elements in the sorted set.","history",[["6.2.0","Added the `CH`, `NX` and `XX` options."]],"arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","condition","type","oneof","since","6.2.0","flags",["optional"],"arguments",[["name","nx","type","pure-token","display_text","nx","token","NX"],["name","xx","type","pure-token","display_text","xx","token","XX"]]],["name","change","type","pure-token","display_text","change","token","CH","since","6.2.0","flags",["optional"]],["name","data","type","block","flags",["multiple"],"arguments",[["name","longitude","type","double","display_text","longitude"],["name","latitude","type","double","display_text","latitude"],["name","member","type","string","display_text","member"]]]]],"cms.incrby",["group","module","module","bf"],"bf.exists",["group","module","module","bf"],"linsert",["summary","Inserts 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","display_text","key","key_spec_index",0],["name","where","type","oneof","arguments",[["name","before","type","pure-token","display_text","before","token","BEFORE"],["name","after","type","pure-token","display_text","after","token","AFTER"]]],["name","pivot","type","string","display_text","pivot"],["name","element","type","string","display_text","element"]]],"bzpopmin",["summary","Removes and returns the member with the lowest score from one or more sorted sets. Blocks until a member is available otherwise. Deletes the sorted set if the last element was popped.","since","5.0.0","group","sorted-set","complexity","O(log(N)) with N being the number of elements in the sorted set.","history",[["6.0.0","`timeout` is interpreted as a double instead of an integer."]],"arguments",[["name","key","type","key","display_text","key","key_spec_index",0,"flags",["multiple"]],["name","timeout","type","double","display_text","timeout"]]],"sync",["summary","An internal command used in replication.","since","1.0.0","group","server"],"FT.DICTDEL",["group","module","module","search"],"randomkey",["summary","Returns a random key name from the database.","since","1.0.0","group","generic","complexity","O(1)"],"replconf",["summary","An internal command for configuring the replication stream.","since","3.0.0","group","server","complexity","O(1)","doc_flags",["syscmd"]],"ts.incrby",["group","module","module","timeseries"],"bgrewriteaof",["summary","Asynchronously rewrites the append-only file to disk.","since","1.0.0","group","server","complexity","O(1)"],"ts.del",["group","module","module","timeseries"],"monitor",["summary","Listens for all requests received by the server in real-time.","since","1.0.0","group","server"],"eval_ro",["summary","Executes a read-only server-side Lua script.","since","7.0.0","group","scripting","complexity","Depends on the script that is executed.","arguments",[["name","script","type","string","display_text","script"],["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"]]]],"slaveof",["summary","Sets a Redis server as a replica of another, or promotes it to being a master.","since","1.0.0","group","server","complexity","O(1)","doc_flags",["deprecated"],"deprecated_since","5.0.0","replaced_by","`REPLICAOF`","arguments",[["name","args","type","oneof","arguments",[["name","host-port","type","block","arguments",[["name","host","type","string","display_text","host"],["name","port","type","integer","display_text","port"]]],["name","no-one","type","block","arguments",[["name","no","type","pure-token","display_text","no","token","NO"],["name","one","type","pure-token","display_text","one","token","ONE"]]]]]]],"lpush",["summary","Prepends one or more elements to a list. Creates the key if it doesn't exist.","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","display_text","key","key_spec_index",0],["name","element","type","string","display_text","element","flags",["multiple"]]]],"touch",["summary","Returns the number of existing keys out of those specified after updating the time they were last accessed.","since","3.2.1","group","generic","complexity","O(N) where N is the number of keys that will be touched.","arguments",[["name","key","type","key","display_text","key","key_spec_index",0,"flags",["multiple"]]]],"hgetdel",["summary","Returns the value of a field and deletes it from the hash.","since","8.0.0","group","hash","complexity","O(N) where N is the number of specified fields","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","fields","type","block","token","FIELDS","arguments",[["name","numfields","type","integer","display_text","numfields"],["name","field","type","string","display_text","field","flags",["multiple"]]]]]],"json.objlen",["group","module","module","ReJSON"],"ts.queryindex",["group","module","module","timeseries"],"hgetall",["summary","Returns all fields and values 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]]],"append",["summary","Appends a string to the value of a key. Creates the key if it doesn't exist.","since","2.0.0","group","string","complexity","O(1). The amortized time complexity is O(1) assuming the appended value is small and the already present value is of any size, since the dynamic string library used by Redis will double the free space available on every reallocation.","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","value","type","string","display_text","value"]]],"readwrite",["summary","Enables read-write queries for a connection to a Reids Cluster replica node.","since","3.0.0","group","cluster","complexity","O(1)"],"save",["summary","Synchronously saves the database(s) to disk.","since","1.0.0","group","server","complexity","O(N) where N is the total number of keys in all databases"],"ts.create",["group","module","module","timeseries"],"hscan",["summary","Iterates over fields and values of a hash.","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","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"]],["name","novalues","type","pure-token","display_text","novalues","token","NOVALUES","flags",["optional"]]]],"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",[["name","gt","type","pure-token","display_text","gt","token","GT"],["name","lt","type","pure-token","display_text","lt","token","LT"]]],["name","change","type","pure-token","display_text","change","token","CH","since","3.0.2","flags",["optional"]],["name","increment","type","pure-token","display_text","increment","token","INCR","since","3.0.2","flags",["optional"]],["name","data","type","block","flags",["multiple"],"arguments",[["name","score","type","double","display_text","score"],["name","member","type","string","display_text","member"]]]]],"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"]]]]]]]]]]],"ltrim",["summary","Removes elements from both ends a list. Deletes the list if all elements were trimmed.","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","display_text","key","key_spec_index",0],["name","start","type","integer","display_text","start"],["name","stop","type","integer","display_text","stop"]]],"ttl",["summary","Returns the expiration time in seconds of a key.","since","1.0.0","group","generic","complexity","O(1)","history",[["2.8.0","Added the -2 reply."]],"arguments",[["name","key","type","key","display_text","key","key_spec_index",0]]],"search.CLUSTERREFRESH",["group","module","module","search"],"getex",["summary","Returns the string value of a key after setting its expiration time.","since","6.2.0","group","string","complexity","O(1)","arguments",[["name","key","type","key","display_text","key","key_spec_index",0],["name","expiration","type","oneof","flags",["optional"],"arguments",[["name","seconds","type","integer","display_text","seconds","token","EX"],["name","milliseconds","type","integer","display_text","milliseconds","token","PX"],["name","unix-time-seconds","type","unix-time","display_text","unix-time-seconds","token","EXAT"],["name","unix-time-milliseconds","type","unix-time","display_text","unix-time-milliseconds","token","PXAT"],["name","persist","type","pure-token","display_text","persist","token","PERSIST"]]]]],"ts.alter",["group","module","module","timeseries"],"timeseries.CLUSTERSET",["group","module","module","timeseries"],"tdigest.merge",["group","module","module","bf"],"evalsha",["summary","Executes a server-side Lua script by SHA1 digest.","since","2.6.0","group","scripting","complexity","Depends on the script that is executed.","arguments",[["name","sha1","type","string","display_text","sha1"],["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"]]]],"pexpire",["summary","Sets the expiration time of a key 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","display_text","key","key_spec_index",0],["name","milliseconds","type","integer","display_text","milliseconds"],["name","condition","type","oneof","since","7.0.0","flags",["optional"],"arguments",[["name","nx","type","pure-token","display_text","nx","token","NX"],["name","xx","type","pure-token","display_text","xx","token","XX"],["name","gt","type","pure-token","display_text","gt","token","GT"],["name","lt","type","pure-token","display_text","lt","token","LT"]]]]],"json.numpowby",["group","module","module","ReJSON"],"json.del",["group","module","module","ReJSON"],"bf.debug",["group","module","module","bf"],"zrangestore",["summary","Stores a range of members from sorted set in a key.","since","6.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 stored into the destination key.","arguments",[["name","dst","type","key","display_text","dst","key_spec_index",0],["name","src","type","key","display_text","src","key_spec_index",1],["name","min","type","string","display_text","min"],["name","max","type","string","display_text","max"],["name","sortby","type","oneof","flags",["optional"],"arguments",[["name","byscore","type","pure-token","display_text","byscore","token","BYSCORE"],["name","bylex","type","pure-token","display_text","bylex","token","BYLEX"]]],["name","rev","type","pure-token","display_text","rev","token","REV","flags",["optional"]],["name","limit","type","block","token","LIMIT","flags",["optional"],"arguments",[["name","offset","type","integer","display_text","offset"],["name","count","type","integer","display_text","count"]]]]],"tdigest.trimmed_mean",["group","module","module","bf"],"lmpop",["summary","Returns multiple elements from a list after removing them. Deletes the list if the last element was popped.","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","display_text","numkeys"],["name","key","type","key","display_text","key","key_spec_index",0,"flags",["multiple"]],["name","where","type","oneof","arguments",[["name","left","type","pure-token","display_text","left","token","LEFT"],["name","right","type","pure-token","display_text","right","token","RIGHT"]]],["name","count","type","integer","display_text","count","token","COUNT","flags",["optional"]]]],"ts.add",["group","module","module","timeseries"],"FT.CURSOR",["group","module","module","search"],"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"]]]]],"spublish",["summary","Post a message to a shard channel","since","7.0.0","group","pubsub","complexity","O(N) where N is the number of clients subscribed to the receiving shard channel.","arguments",[["name","shardchannel","type","string","display_text","shardchannel"],["name","message","type","string","display_text","message"]]],"client",["summary","A container for client connection commands.","since","2.4.0","group","connection","complexity","Depends on subcommand.","subcommands",["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|id",["summary","Returns the unique client ID of the connection.","since","5.0.0","group","connection","complexity","O(1)"],"client|info",["summary","Returns information about the connection.","since","6.2.0","group","connection","complexity","O(1)"],"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|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|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|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|trackinginfo",["summary","Returns information about server-assisted client-side caching for the connection.","since","6.2.0","group","connection","complexity","O(1)"],"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."],["7.4.0","`MAXAGE` 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"]]],["name","maxage","type","integer","display_text","maxage","token","MAXAGE","since","7.4.0","flags",["optional"]]]]]]]],"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|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|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"]]]]],"client|getname",["summary","Returns the name of the connection.","since","2.6.9","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."],["7.2.0","Added `lib-name` and `lib-ver` fields."],["7.4.0","Added `watch` field."],["8.0.0","Added `io-thread` field."]],"argumen