From 3c910136c1050ce3943c63201eedb7e940652f38 Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 21 Apr 2009 00:33:34 +0200 Subject: [PATCH] doc update --- TODO | 3 +-- doc/AuthCommand.html | 39 ++++++++++++++++++++++++++++++++++++ doc/CommandReference.html | 4 ++-- doc/SinterCommand.html | 4 ++-- doc/SunionCommand.html | 40 +++++++++++++++++++++++++++++++++++++ doc/SunionstoreCommand.html | 39 ++++++++++++++++++++++++++++++++++++ 6 files changed, 123 insertions(+), 6 deletions(-) create mode 100644 doc/AuthCommand.html create mode 100644 doc/SunionCommand.html create mode 100644 doc/SunionstoreCommand.html diff --git a/TODO b/TODO index 203d6f114..f3a911cbc 100644 --- a/TODO +++ b/TODO @@ -11,7 +11,6 @@ BEFORE REDIS 1.0.0-rc1 - check 'server.dirty' everywere - config parameter to change the name of the DB file - replication automated tests -- replication non stopping master<->slave syncronization - an external tool able to perform the 'difference' between two Redis servers. It's like 'diff', but against Redis servers, and the output is the set of commands needed to turn the first server into the second, suitable to be sent via netcat. $ ./redis-diff 192.168.1.1 192.168.1.2 > diff.txt $ cat diff.txt | nc 192.168.1.1 6379 @@ -24,7 +23,7 @@ This command should be smart and don't use too much memory, that is, take two co - Add missing commands in documentation - Document replication - Objects sharing configuration, add the directive "objectsharingpool " -- Make sure to confert all the fstat() calls to 64bit versions. +- Make sure to convert all the fstat() calls to 64bit versions. FUTURE HINTS diff --git a/doc/AuthCommand.html b/doc/AuthCommand.html new file mode 100644 index 000000000..a326a8456 --- /dev/null +++ b/doc/AuthCommand.html @@ -0,0 +1,39 @@ + + + + + + + +
+ + + +
+
+ +AuthCommand: Contents
  AUTH _password_
    Return value +
+ +

AuthCommand

+ +
+ +
+ +
+

AUTH _password_

Request for authentication in a password protected Redis server.A Redis server can be instructed to require a password before to allow clientsto issue commands. This is done using the requirepass directive in theRedis configuration file.
+
If the password given by the client is correct the server replies withan OK status code reply and starts accepting commands from the client.Otherwise an error is returned and the clients needs to try a new password.Note that for the high performance nature of Redis it is possible to trya lot of passwords in parallel in very short time, so make sure to generatea strong and very long password so that this attack is infeasible.
+

Return value

Status code reply + +
+ +
+
+ + + diff --git a/doc/CommandReference.html b/doc/CommandReference.html index 3ef05e6dc..791278369 100644 --- a/doc/CommandReference.html +++ b/doc/CommandReference.html @@ -26,11 +26,11 @@
-

Redis Command Reference

Every command name links to a specific wiki page describing the behavior of the command.

Connection handling

  • QUIT close the connection
+

Redis Command Reference

Every command name links to a specific wiki page describing the behavior of the command.

Connection handling

  • QUIT close the connection
  • AUTH simple password authentication if enabled

Commands operating on string values

  • SET key value set a key to a string value
  • GET key return the string value of the key
  • MGET key1 key2 ... keyN multi-get, return the strings values of the keys
  • SETNX key value set a key to a string value if the key does not exist
  • INCR key increment the integer value of key
  • INCRBY key integer increment the integer value of key by integer
  • INCR key decrement the integer value of key
  • DECRBY key integer decrement the integer value of key by integer
  • EXISTS key test if a key exists
  • DEL key delete a key
  • TYPE key return the type of the value stored at key

Commands operating on the key space

  • KEYS pattern return all the keys matching a given pattern
  • RANDOMKEY return a random key from the key space
  • RENAME oldname newname rename the old key in the new one, destroing the newname key if it already exists
  • RENAMENX oldname newname rename the old key in the new one, if the newname key does not already exist
  • DBSIZE return the number of keys in the current db
  • EXPIRE set a time to live in seconds on a key

Commands operating on lists

  • RPUSH key value Append an element to the tail of the List value at key
  • LPUSH key value Append an element to the head of the List value at key
  • LLEN key Return the length of the List value at key
  • LRANGE key start end Return a range of elements from the List at key
  • LTRIM key start end Trim the list at key to the specified range of elements
  • LINDEX key index Return the element at index position from the List at key
  • LSET key index value Set a new value as the element at index position of the List at key
  • LREM key count value Remove the first-N, last-N, or all the elements matching value from the List at key
  • LPOP key Return and remove (atomically) the first element of the List at key
  • RPOP key Return and remove (atomically) the last element of the List at key
-

Commands operating on sets

  • SADD key member Add the specified member to the Set value at key
  • SREM key member Remove the specified member from the Set value at key
  • SCARD key Return the number of elements (the cardinality) of the Set at key
  • SISMEMBER key member Test if the specified value is a member of the Set at key
  • SINTER key1 key2 ... keyN Return the intersection between the Sets stored at key1, key2, ..., keyN
  • SINTERSTORE dstkey key1 key2 ... keyN Compute the intersection between the Sets stored at key1, key2, ..., keyN, and store the resulting Set at dstkey
  • SMEMBERS key Return all the members of the Set value at key
+

Commands operating on sets

  • SADD key member Add the specified member to the Set value at key
  • SREM key member Remove the specified member from the Set value at key
  • SCARD key Return the number of elements (the cardinality) of the Set at key
  • SISMEMBER key member Test if the specified value is a member of the Set at key
  • SINTER key1 key2 ... keyN Return the intersection between the Sets stored at key1, key2, ..., keyN
  • SINTERSTORE dstkey key1 key2 ... keyN Compute the intersection between the Sets stored at key1, key2, ..., keyN, and store the resulting Set at dstkey
  • SUNION key1 key2 ... keyN Return the union between the Sets stored at key1, key2, ..., keyN
  • SUNIONSTORE dstkey key1 key2 ... keyN Compute the union between the Sets stored at key1, key2, ..., keyN, and store the resulting Set at dstkey
  • SMEMBERS key Return all the members of the Set value at key

Multiple databases handling commands

  • SELECT index Select the DB having the specified index
  • MOVE key dbindex Move the key from the currently selected DB to the DB having as index dbindex
  • FLUSHDB Remove all the keys of the currently selected DB
  • FLUSHALL Remove all the keys from all the databases

Sorting

  • SORT key BY pattern LIMIT start end GET pattern ASC|DESC ALPHA Sort a Set or a List accordingly to the specified parameters

Persistence control commands

  • SAVE Synchronously save the DB on disk
  • BGSAVE Asynchronously save the DB on disk
  • LASTSAVE Return the UNIX time stamp of the last successfully saving of the dataset on disk
  • SHUTDOWN Synchronously save the DB on disk, then shutdown the server
diff --git a/doc/SinterCommand.html b/doc/SinterCommand.html index 22d6acf59..efbe7a5c5 100644 --- a/doc/SinterCommand.html +++ b/doc/SinterCommand.html @@ -28,9 +28,9 @@

SINTER _key1_ _key2_ ... _keyN_

Time complexity O(NM) worst case where N is the cardinality of the smallest set and M the number of sets_

Return the members of a set resulting from the intersection of all thesets hold at the specified keys. Like in LRANGE the result is sent tothe client as a multi-bulk reply (see the protocol specification formore information). If just a single key is specified, then this commandproduces the same result as SELEMENTS. Actually SELEMENTS is just syntaxsugar for SINTERSECT.
-
If at least one of the specified keys does not exist or does not holda set value an error is returned.
+
Non existing keys are considered like empty sets, so if one of the keys ismissing an empty set is returned (since the intersection with an emptyset always is an empty set).

Return value

Multi bulk reply, specifically the list of common elements.

See also

-
* SREM* SISMEMBER* SCARD* SMEMBERS* SINTER* SINTERSTORE
+
* SREM* SISMEMBER* SCARD* SMEMBERS* SINTERSTORE* SUNION* SUNIONSTORE
diff --git a/doc/SunionCommand.html b/doc/SunionCommand.html new file mode 100644 index 000000000..bc1e25645 --- /dev/null +++ b/doc/SunionCommand.html @@ -0,0 +1,40 @@ + + + + + + + +
+ + + +
+
+ +SunionCommand: Contents
  SUNION _key1_ _key2_ ... _keyN_
    Return value
    See also +
+ +

SunionCommand

+ +
+ +
+ +
+

SUNION _key1_ _key2_ ... _keyN_

+Time complexity O(N) where N is the total number of elements in all the provided sets
Return the members of a set resulting from the union of all thesets hold at the specified keys. Like in LRANGE the result is sent tothe client as a multi-bulk reply (see the protocol specification formore information). If just a single key is specified, then this commandproduces the same result as SELEMENTS.
+
Non existing keys are considered like empty sets.
+

Return value

Multi bulk reply, specifically the list of common elements.

See also

+ +
+ +
+
+ + + diff --git a/doc/SunionstoreCommand.html b/doc/SunionstoreCommand.html new file mode 100644 index 000000000..f05197647 --- /dev/null +++ b/doc/SunionstoreCommand.html @@ -0,0 +1,39 @@ + + + + + + + +
+ + + +
+
+ +SunionstoreCommand: Contents
  SUNIONSTORE _dstkey_ _key1_ _key2_ ... _keyN_
    Return value
    See also +
+ +

SunionstoreCommand

+ +
+ +
+ +
+

SUNIONSTORE _dstkey_ _key1_ _key2_ ... _keyN_

+Time complexity O(N) where N is the total number of elements in all the provided sets
This commnad works exactly like SUNION but instead of being returned the resulting set is sotred as dstkey.
+

Return value

Status code reply

See also

+ +
+ +
+
+ + +