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
{ {
"ZDIFF": { "ZDIFF": {
"summary": "Subtract multiple sorted sets", "summary": "Returns the difference between multiple sorted sets.",
"complexity": "O(L + (N-K)log(N)) worst case where L is the total number of elements in all the sets, N is the size of the first set, and K is the size of the result set.", "complexity": "O(L + (N-K)log(N)) worst case where L is the total number of elements in all the sets, N is the size of the first set, and K is the size of the result set.",
"group": "sorted_set", "group": "sorted_set",
"since": "6.2.0", "since": "6.2.0",
......
{ {
"ZDIFFSTORE": { "ZDIFFSTORE": {
"summary": "Subtract multiple sorted sets and store the resulting sorted set in a new key", "summary": "Stores the difference of multiple sorted sets in a key.",
"complexity": "O(L + (N-K)log(N)) worst case where L is the total number of elements in all the sets, N is the size of the first set, and K is the size of the result set.", "complexity": "O(L + (N-K)log(N)) worst case where L is the total number of elements in all the sets, N is the size of the first set, and K is the size of the result set.",
"group": "sorted_set", "group": "sorted_set",
"since": "6.2.0", "since": "6.2.0",
......
{ {
"ZINCRBY": { "ZINCRBY": {
"summary": "Increment the score of a member in a sorted set", "summary": "Increments the score of a member in a sorted set.",
"complexity": "O(log(N)) where N is the number of elements in the sorted set.", "complexity": "O(log(N)) where N is the number of elements in the sorted set.",
"group": "sorted_set", "group": "sorted_set",
"since": "1.2.0", "since": "1.2.0",
......
{ {
"ZINTER": { "ZINTER": {
"summary": "Intersect multiple sorted sets", "summary": "Returns the intersect of multiple sorted sets.",
"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.", "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.",
"group": "sorted_set", "group": "sorted_set",
"since": "6.2.0", "since": "6.2.0",
......
{ {
"ZINTERCARD": { "ZINTERCARD": {
"summary": "Intersect multiple sorted sets and return the cardinality of the result", "summary": "Returns the number of members of the intersect of multiple sorted sets.",
"complexity": "O(N*K) worst case with N being the smallest input sorted set, K being the number of input sorted sets.", "complexity": "O(N*K) worst case with N being the smallest input sorted set, K being the number of input sorted sets.",
"group": "sorted_set", "group": "sorted_set",
"since": "7.0.0", "since": "7.0.0",
......
{ {
"ZINTERSTORE": { "ZINTERSTORE": {
"summary": "Intersect multiple sorted sets and store the resulting sorted set in a new key", "summary": "Stores the intersect of multiple sorted sets in a key.",
"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.", "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.",
"group": "sorted_set", "group": "sorted_set",
"since": "2.0.0", "since": "2.0.0",
......
{ {
"ZLEXCOUNT": { "ZLEXCOUNT": {
"summary": "Count the number of members in a sorted set between a given lexicographical range", "summary": "Returns the number of members in a sorted set within a lexicographical range.",
"complexity": "O(log(N)) with N being the number of elements in the sorted set.", "complexity": "O(log(N)) with N being the number of elements in the sorted set.",
"group": "sorted_set", "group": "sorted_set",
"since": "2.8.9", "since": "2.8.9",
......
{ {
"ZMPOP": { "ZMPOP": {
"summary": "Remove and return members with scores in a sorted set", "summary": "Returns the highest- or lowest-scoring members from one or more sorted sets after removing them. Deletes the sorted set if the last member was popped.",
"complexity": "O(K) + O(M*log(N)) where K is the number of provided keys, N being the number of elements in the sorted set, and M being the number of elements popped.", "complexity": "O(K) + O(M*log(N)) where K is the number of provided keys, N being the number of elements in the sorted set, and M being the number of elements popped.",
"group": "sorted_set", "group": "sorted_set",
"since": "7.0.0", "since": "7.0.0",
......
{ {
"ZMSCORE": { "ZMSCORE": {
"summary": "Get the score associated with the given members in a sorted set", "summary": "Returns the score of one or more members in a sorted set.",
"complexity": "O(N) where N is the number of members being requested.", "complexity": "O(N) where N is the number of members being requested.",
"group": "sorted_set", "group": "sorted_set",
"since": "6.2.0", "since": "6.2.0",
......
{ {
"ZPOPMAX": { "ZPOPMAX": {
"summary": "Remove and return members with the highest scores in a sorted set", "summary": "Returns the highest-scoring members from a sorted set after removing them. Deletes the sorted set if the last member was popped.",
"complexity": "O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped.", "complexity": "O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped.",
"group": "sorted_set", "group": "sorted_set",
"since": "5.0.0", "since": "5.0.0",
......
{ {
"ZPOPMIN": { "ZPOPMIN": {
"summary": "Remove and return members with the lowest scores in a sorted set", "summary": "Returns the lowest-scoring members from a sorted set after removing them. Deletes the sorted set if the last member was popped.",
"complexity": "O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped.", "complexity": "O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped.",
"group": "sorted_set", "group": "sorted_set",
"since": "5.0.0", "since": "5.0.0",
......
{ {
"ZRANDMEMBER": { "ZRANDMEMBER": {
"summary": "Get one or multiple random elements from a sorted set", "summary": "Returns one or more random members from a sorted set.",
"complexity": "O(N) where N is the number of elements returned", "complexity": "O(N) where N is the number of members returned",
"group": "sorted_set", "group": "sorted_set",
"since": "6.2.0", "since": "6.2.0",
"arity": -2, "arity": -2,
......
{ {
"ZRANGE": { "ZRANGE": {
"summary": "Return a range of members in a sorted set", "summary": "Returns members in a sorted set within a range of indexes.",
"complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.", "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.",
"group": "sorted_set", "group": "sorted_set",
"since": "1.2.0", "since": "1.2.0",
......
{ {
"ZRANGEBYLEX": { "ZRANGEBYLEX": {
"summary": "Return a range of members in a sorted set, by lexicographical range", "summary": "Returns members in a sorted set within a lexicographical range.",
"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)).", "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)).",
"group": "sorted_set", "group": "sorted_set",
"since": "2.8.9", "since": "2.8.9",
......
{ {
"ZRANGEBYSCORE": { "ZRANGEBYSCORE": {
"summary": "Return a range of members in a sorted set, by score", "summary": "Returns members in a sorted set within a range of scores.",
"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)).", "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)).",
"group": "sorted_set", "group": "sorted_set",
"since": "1.0.5", "since": "1.0.5",
......
{ {
"ZRANGESTORE": { "ZRANGESTORE": {
"summary": "Store a range of members from sorted set into another key", "summary": "Stores a range of members from sorted set in a key.",
"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.", "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.",
"group": "sorted_set", "group": "sorted_set",
"since": "6.2.0", "since": "6.2.0",
......
{ {
"ZRANK": { "ZRANK": {
"summary": "Determine the index of a member in a sorted set", "summary": "Returns the index of a member in a sorted set ordered by ascending scores.",
"complexity": "O(log(N))", "complexity": "O(log(N))",
"group": "sorted_set", "group": "sorted_set",
"since": "2.0.0", "since": "2.0.0",
......
{ {
"ZREM": { "ZREM": {
"summary": "Remove one or more members from a sorted set", "summary": "Removes one or more members from a sorted set. Deletes the sorted set if all members were removed.",
"complexity": "O(M*log(N)) with N being the number of elements in the sorted set and M the number of elements to be removed.", "complexity": "O(M*log(N)) with N being the number of elements in the sorted set and M the number of elements to be removed.",
"group": "sorted_set", "group": "sorted_set",
"since": "1.2.0", "since": "1.2.0",
......
{ {
"ZREMRANGEBYLEX": { "ZREMRANGEBYLEX": {
"summary": "Remove all members in a sorted set between the given lexicographical range", "summary": "Removes members in a sorted set within a lexicographical range. Deletes the sorted set if all members were removed.",
"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.", "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.",
"group": "sorted_set", "group": "sorted_set",
"since": "2.8.9", "since": "2.8.9",
......
{ {
"ZREMRANGEBYRANK": { "ZREMRANGEBYRANK": {
"summary": "Remove all members in a sorted set within the given indexes", "summary": "Removes members in a sorted set within a range of indexes. Deletes the sorted set if all members were removed.",
"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.", "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.",
"group": "sorted_set", "group": "sorted_set",
"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