Unverified Commit 0c3b8b7e authored by Itamar Haber's avatar Itamar Haber Committed by GitHub
Browse files

Overhauls command summaries and man pages. (#11942)

This is an attempt to normalize/formalize command summaries.

Main actions performed:

* Starts with the continuation of the phrase "The XXXX command, when called, ..." for user commands.
* Starts with "An internal command...", "A container command...", etc... when applicable.
* Always uses periods.
* Refrains from referring to other commands. If this is needed, backquotes should be used for command names.
* Tries to be very clear about the data type when applicable.
* Tries to mention additional effects, e.g. "The key is created if it doesn't exist" and "The set is deleted if the last member is removed."
* Prefers being terse over verbose.
* Tries to be consistent.
parent cb171786
{ {
"READONLY": { "READONLY": {
"summary": "Enables read queries for a connection to a cluster replica node", "summary": "Enables read-only queries for a connection to a Redis Cluster replica node.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "cluster", "group": "cluster",
"since": "3.0.0", "since": "3.0.0",
......
{ {
"READWRITE": { "READWRITE": {
"summary": "Disables read queries for a connection to a cluster replica node", "summary": "Enables read-write queries for a connection to a Reids Cluster replica node.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "cluster", "group": "cluster",
"since": "3.0.0", "since": "3.0.0",
......
{ {
"RENAME": { "RENAME": {
"summary": "Rename a key", "summary": "Renames a key and overwrites the destination.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "generic", "group": "generic",
"since": "1.0.0", "since": "1.0.0",
......
{ {
"RENAMENX": { "RENAMENX": {
"summary": "Rename a key, only if the new key does not exist", "summary": "Renames a key only when the target key name doesn't exist.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "generic", "group": "generic",
"since": "1.0.0", "since": "1.0.0",
......
{ {
"REPLCONF": { "REPLCONF": {
"summary": "An internal command for configuring the replication stream", "summary": "An internal command for configuring the replication stream.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "server", "group": "server",
"since": "3.0.0", "since": "3.0.0",
......
{ {
"REPLICAOF": { "REPLICAOF": {
"summary": "Make the server a replica of another instance, or promote it as master.", "summary": "Configures a server as replica of another, or promotes it to a master.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "server", "group": "server",
"since": "5.0.0", "since": "5.0.0",
......
{ {
"RESET": { "RESET": {
"summary": "Reset the connection", "summary": "Resets the connection.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "connection", "group": "connection",
"since": "6.2.0", "since": "6.2.0",
......
{ {
"RESTORE-ASKING": { "RESTORE-ASKING": {
"summary": "An internal command for migrating keys in a cluster", "summary": "An internal command for migrating keys in a cluster.",
"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)).", "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)).",
"group": "server", "group": "server",
"since": "3.0.0", "since": "3.0.0",
......
{ {
"RESTORE": { "RESTORE": {
"summary": "Create a key using the provided serialized value, previously obtained using DUMP.", "summary": "Creates a key from the serialized representation of a value.",
"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)).", "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)).",
"group": "generic", "group": "generic",
"since": "2.6.0", "since": "2.6.0",
......
{ {
"ROLE": { "ROLE": {
"summary": "Return the role of the instance in the context of replication", "summary": "Returns the replication role.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "server", "group": "server",
"since": "2.8.12", "since": "2.8.12",
......
{ {
"RPOP": { "RPOP": {
"summary": "Remove and get the last elements in a list", "summary": "Returns and removes the last elements of a list. Deletes the list if the lst element was popped.",
"complexity": "O(N) where N is the number of elements returned", "complexity": "O(N) where N is the number of elements returned",
"group": "list", "group": "list",
"since": "1.0.0", "since": "1.0.0",
......
{ {
"RPOPLPUSH": { "RPOPLPUSH": {
"summary": "Remove the last element in a list, prepend it to another list and return it", "summary": "Returns the last element of a list after removing and pushing it to another list. Deletes the list if the lst element was popped.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "list", "group": "list",
"since": "1.2.0", "since": "1.2.0",
......
{ {
"RPUSH": { "RPUSH": {
"summary": "Append one or multiple elements to a list", "summary": "Appends one or more elements to a list. Creates the key if it doesn't exist.",
"complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.", "complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.",
"group": "list", "group": "list",
"since": "1.0.0", "since": "1.0.0",
......
{ {
"RPUSHX": { "RPUSHX": {
"summary": "Append an element to a list, only if the list exists", "summary": "Appends an element to a list only when the list exists.",
"complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.", "complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.",
"group": "list", "group": "list",
"since": "2.2.0", "since": "2.2.0",
......
{ {
"SADD": { "SADD": {
"summary": "Add one or more members to a set", "summary": "Adds one or more members to a set. Creates the key if it doesn't exist.",
"complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.", "complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.",
"group": "set", "group": "set",
"since": "1.0.0", "since": "1.0.0",
......
{ {
"SAVE": { "SAVE": {
"summary": "Synchronously save the dataset to disk", "summary": "Synchronously saves the database(s) to disk.",
"complexity": "O(N) where N is the total number of keys in all databases", "complexity": "O(N) where N is the total number of keys in all databases",
"group": "server", "group": "server",
"since": "1.0.0", "since": "1.0.0",
......
{ {
"SCAN": { "SCAN": {
"summary": "Incrementally iterate the keys space", "summary": "Iterates over the key names in the database.",
"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.", "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.",
"group": "generic", "group": "generic",
"since": "2.8.0", "since": "2.8.0",
......
{ {
"SCARD": { "SCARD": {
"summary": "Get the number of members in a set", "summary": "Returns the number of members in a set.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "set", "group": "set",
"since": "1.0.0", "since": "1.0.0",
......
{ {
"DEBUG": { "DEBUG": {
"summary": "Set the debug mode for executed scripts.", "summary": "Sets the debug mode of server-side Lua scripts.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "scripting", "group": "scripting",
"since": "3.2.0", "since": "3.2.0",
......
{ {
"EXISTS": { "EXISTS": {
"summary": "Check existence of scripts in the script cache.", "summary": "Determines whether server-side Lua scripts exist in the script cache.",
"complexity": "O(N) with N being the number of scripts to check (so checking a single script is an O(1) operation).", "complexity": "O(N) with N being the number of scripts to check (so checking a single script is an O(1) operation).",
"group": "scripting", "group": "scripting",
"since": "2.6.0", "since": "2.6.0",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment