X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/924aa408b99837036b679bd3895f836af6bc763f..46834808fe31e7cbf08d6c9f7638a54c5c8bff8a:/doc/MsetCommand.html diff --git a/doc/MsetCommand.html b/doc/MsetCommand.html index 166f4ac3..2b6bff0f 100644 --- a/doc/MsetCommand.html +++ b/doc/MsetCommand.html @@ -16,7 +16,7 @@
-MsetCommand: Contents
  MSETNX _key1_ _value1_ _key2_ _value2_ ... _keyN_ _valueN_ (Redis >
    MSET Return value
    MSETNX Return value
    See also +MsetCommand: Contents
  MSET _key1_ _value1_ _key2_ _value2_ ... _keyN_ _valueN_ (Redis >
  MSETNX _key1_ _value1_ _key2_ _value2_ ... _keyN_ _valueN_ (Redis >
    MSET Return value
    MSETNX Return value

MsetCommand

@@ -26,15 +26,15 @@
- = MSET key1 value1 key2 value2 ... keyN valueN (Redis >= 1.1) = + #sidebar StringCommandsSidebar

MSET _key1_ _value1_ _key2_ _value2_ ... _keyN_ _valueN_ (Redis >

1.1) =

MSETNX _key1_ _value1_ _key2_ _value2_ ... _keyN_ _valueN_ (Redis >

1.1) = -Time complexity: O(1) to set every key
Set the the rispective keys to the rispective values. MSET will replace oldvalues with new values, while MSETNX will not perform any operation at alleven if just a single key already exists.
+Time complexity: O(1) to set every key
Set the the respective keys to the respective values. MSET will replace oldvalues with new values, while MSETNX will not perform any operation at alleven if just a single key already exists.
Because of this semantic MSETNX can be used in order to set different keysrepresenting different fields of an unique logic object in a way thatensures that either all the fields or none at all are set.
Both MSET and MSETNX are atomic operations. This means that for instanceif the keys A and B are modified, another client talking to Redis can eithersee the changes to both A and B at once, or no modification at all.

MSET Return value

Status code reply Basically +OK as MSET can't fail

MSETNX Return value

Integer reply, specifically:

 1 if the all the keys were set
 0 if no key was set (at least one key already existed)
-

See also

+