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
{
"SLAVEOF": {
"summary": "Make the server a replica of another instance, or promote it as master.",
"summary": "Sets a Redis server as a replica of another, or promotes it to being a master.",
"complexity": "O(1)",
"group": "server",
"since": "1.0.0",
......
{
"GET": {
"summary": "Get the slow log's entries",
"summary": "Returns the slow log's entries.",
"complexity": "O(N) where N is the number of entries returned",
"group": "server",
"since": "2.2.12",
......
{
"LEN": {
"summary": "Get the slow log's length",
"summary": "Returns the number of entries in the slow log.",
"complexity": "O(1)",
"group": "server",
"since": "2.2.12",
......
{
"RESET": {
"summary": "Clear all entries from the slow log",
"summary": "Clears all entries from the slow log.",
"complexity": "O(N) where N is the number of entries in the slowlog",
"group": "server",
"since": "2.2.12",
......
{
"SLOWLOG": {
"summary": "A container for slow log commands",
"summary": "A container for slow log commands.",
"complexity": "Depends on subcommand.",
"group": "server",
"since": "2.2.12",
......
{
"SMEMBERS": {
"summary": "Get all the members in a set",
"summary": "Returns all members of a set.",
"complexity": "O(N) where N is the set cardinality.",
"group": "set",
"since": "1.0.0",
......
{
"SMISMEMBER": {
"summary": "Returns the membership associated with the given elements for a set",
"summary": "Determines whether multiple members belong to a set.",
"complexity": "O(N) where N is the number of elements being checked for membership",
"group": "set",
"since": "6.2.0",
......
{
"SMOVE": {
"summary": "Move a member from one set to another",
"summary": "Moves a member from one set to another.",
"complexity": "O(1)",
"group": "set",
"since": "1.0.0",
......
{
"SORT": {
"summary": "Sort the elements in a list, set or sorted set",
"summary": "Sorts the elements in a list, a set, or a sorted set, optionally storing the result.",
"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).",
"group": "generic",
"since": "1.0.0",
......
{
"SORT_RO": {
"summary": "Sort the elements in a list, set or sorted set. Read-only variant of SORT.",
"summary": "Returns the sorted elements of a list, a set, or a sorted set.",
"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).",
"group": "generic",
"since": "7.0.0",
......
{
"SPOP": {
"summary": "Remove and return one or multiple random members from a set",
"summary": "Returns one or more random members from a set after removing them. Deletes the set if the last member was popped.",
"complexity": "Without the count argument O(1), otherwise O(N) where N is the value of the passed count.",
"group": "set",
"since": "1.0.0",
......
{
"SREM": {
"summary": "Remove one or more members from a set",
"summary": "Removes one or more members from a set. Deletes the set if the last member was removed.",
"complexity": "O(N) where N is the number of members to be removed.",
"group": "set",
"since": "1.0.0",
......
{
"SSCAN": {
"summary": "Incrementally iterate Set elements",
"summary": "Iterates over members of a 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.",
"group": "set",
"since": "2.8.0",
......
{
"SSUBSCRIBE": {
"summary": "Listen for messages published to the given shard channels",
"summary": "Listens for messages published to shard channels.",
"complexity": "O(N) where N is the number of shard channels to subscribe to.",
"group": "pubsub",
"since": "7.0.0",
......
{
"STRLEN": {
"summary": "Get the length of the value stored in a key",
"summary": "Returns the length of a string value.",
"complexity": "O(1)",
"group": "string",
"since": "2.2.0",
......
{
"SUBSCRIBE": {
"summary": "Listen for messages published to the given channels",
"summary": "Listens for messages published to channels.",
"complexity": "O(N) where N is the number of channels to subscribe to.",
"group": "pubsub",
"since": "2.0.0",
......
{
"SUBSTR": {
"summary": "Get a substring of the string stored at a key",
"summary": "Returns a substring from a string value.",
"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",
"since": "1.0.0",
......
{
"SUNION": {
"summary": "Add multiple sets",
"summary": "Returns the union of multiple sets.",
"complexity": "O(N) where N is the total number of elements in all given sets.",
"group": "set",
"since": "1.0.0",
......
{
"SUNIONSTORE": {
"summary": "Add multiple sets and store the resulting set in a key",
"summary": "Stores the union of multiple sets in a key.",
"complexity": "O(N) where N is the total number of elements in all given sets.",
"group": "set",
"since": "1.0.0",
......
{
"SUNSUBSCRIBE": {
"summary": "Stop listening for messages posted to the given shard channels",
"summary": "Stops listening to messages posted to shard channels.",
"complexity": "O(N) where N is the number of clients already subscribed to a shard channel.",
"group": "pubsub",
"since": "7.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