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
{ {
"GETEX": { "GETEX": {
"summary": "Get the value of a key and optionally set its expiration", "summary": "Returns the string value of a key after setting its expiration time.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "string", "group": "string",
"since": "6.2.0", "since": "6.2.0",
......
{ {
"GETRANGE": { "GETRANGE": {
"summary": "Get a substring of the string stored at a key", "summary": "Returns a substring of the string stored at a key.",
"complexity": "O(N) where N is the length of the returned string. The complexity is ultimately determined by the returned length, but because creating a substring from an existing string is very cheap, it can be considered O(1) for small strings.", "complexity": "O(N) where N is the length of the returned string. The complexity is ultimately determined by the returned length, but because creating a substring from an existing string is very cheap, it can be considered O(1) for small strings.",
"group": "string", "group": "string",
"since": "2.4.0", "since": "2.4.0",
......
{ {
"GETSET": { "GETSET": {
"summary": "Set the string value of a key and return its old value", "summary": "Returns the previous string value of a key after setting it to a new value.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "string", "group": "string",
"since": "1.0.0", "since": "1.0.0",
......
{ {
"HDEL": { "HDEL": {
"summary": "Delete one or more hash fields", "summary": "Deletes one or more fields and their values from a hash. Deletes the hash if no fields remain.",
"complexity": "O(N) where N is the number of fields to be removed.", "complexity": "O(N) where N is the number of fields to be removed.",
"group": "hash", "group": "hash",
"since": "2.0.0", "since": "2.0.0",
......
{ {
"HELLO": { "HELLO": {
"summary": "Handshake with Redis", "summary": "Handshakes with the Redis server.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "connection", "group": "connection",
"since": "6.0.0", "since": "6.0.0",
......
{ {
"HEXISTS": { "HEXISTS": {
"summary": "Determine if a hash field exists", "summary": "Determines whether a field exists in a hash.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "hash", "group": "hash",
"since": "2.0.0", "since": "2.0.0",
......
{ {
"HGET": { "HGET": {
"summary": "Get the value of a hash field", "summary": "Returns the value of a field in a hash.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "hash", "group": "hash",
"since": "2.0.0", "since": "2.0.0",
......
{ {
"HGETALL": { "HGETALL": {
"summary": "Get all the fields and values in a hash", "summary": "Returns all fields and values in a hash.",
"complexity": "O(N) where N is the size of the hash.", "complexity": "O(N) where N is the size of the hash.",
"group": "hash", "group": "hash",
"since": "2.0.0", "since": "2.0.0",
......
{ {
"HINCRBY": { "HINCRBY": {
"summary": "Increment the integer value of a hash field by the given number", "summary": "Increments the integer value of a field in a hash by a number. Uses 0 as initial value if the field doesn't exist.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "hash", "group": "hash",
"since": "2.0.0", "since": "2.0.0",
......
{ {
"HINCRBYFLOAT": { "HINCRBYFLOAT": {
"summary": "Increment the float value of a hash field by the given amount", "summary": "Increments the floating point value of a field by a number. Uses 0 as initial value if the field doesn't exist.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "hash", "group": "hash",
"since": "2.6.0", "since": "2.6.0",
......
{ {
"HKEYS": { "HKEYS": {
"summary": "Get all the fields in a hash", "summary": "Returns all fields in a hash.",
"complexity": "O(N) where N is the size of the hash.", "complexity": "O(N) where N is the size of the hash.",
"group": "hash", "group": "hash",
"since": "2.0.0", "since": "2.0.0",
......
{ {
"HLEN": { "HLEN": {
"summary": "Get the number of fields in a hash", "summary": "Returns the number of fields in a hash.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "hash", "group": "hash",
"since": "2.0.0", "since": "2.0.0",
......
{ {
"HMGET": { "HMGET": {
"summary": "Get the values of all the given hash fields", "summary": "Returns the values of all fields in a hash.",
"complexity": "O(N) where N is the number of fields being requested.", "complexity": "O(N) where N is the number of fields being requested.",
"group": "hash", "group": "hash",
"since": "2.0.0", "since": "2.0.0",
......
{ {
"HMSET": { "HMSET": {
"summary": "Set multiple hash fields to multiple values", "summary": "Sets the values of multiple fields.",
"complexity": "O(N) where N is the number of fields being set.", "complexity": "O(N) where N is the number of fields being set.",
"group": "hash", "group": "hash",
"since": "2.0.0", "since": "2.0.0",
......
{ {
"HRANDFIELD": { "HRANDFIELD": {
"summary": "Get one or multiple random fields from a hash", "summary": "Returns one or more random fields from a hash.",
"complexity": "O(N) where N is the number of fields returned", "complexity": "O(N) where N is the number of fields returned",
"group": "hash", "group": "hash",
"since": "6.2.0", "since": "6.2.0",
......
{ {
"HSCAN": { "HSCAN": {
"summary": "Incrementally iterate hash fields and associated values", "summary": "Iterates over fields and values of a 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.", "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": "hash", "group": "hash",
"since": "2.8.0", "since": "2.8.0",
......
{ {
"HSET": { "HSET": {
"summary": "Set the string value of a hash field", "summary": "Creates or modifies the value of a field in a 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.", "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.",
"group": "hash", "group": "hash",
"since": "2.0.0", "since": "2.0.0",
......
{ {
"HSETNX": { "HSETNX": {
"summary": "Set the value of a hash field, only if the field does not exist", "summary": "Sets the value of a field in a hash only when the field doesn't exist.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "hash", "group": "hash",
"since": "2.0.0", "since": "2.0.0",
......
{ {
"HSTRLEN": { "HSTRLEN": {
"summary": "Get the length of the value of a hash field", "summary": "Returns the length of the value of a field.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "hash", "group": "hash",
"since": "3.2.0", "since": "3.2.0",
......
{ {
"HVALS": { "HVALS": {
"summary": "Get all the values in a hash", "summary": "Returns all values in a hash.",
"complexity": "O(N) where N is the size of the hash.", "complexity": "O(N) where N is the size of the hash.",
"group": "hash", "group": "hash",
"since": "2.0.0", "since": "2.0.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