From 802539b07e44e577a488601df2eb8d7c6200f35a Mon Sep 17 00:00:00 2001 From: Thanasis Polychronakis Date: Fri, 19 Apr 2013 15:49:32 +0300 Subject: [PATCH] update docs for MULTI exception --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index b8237f0043..545ffe9911 100644 --- a/README.md +++ b/README.md @@ -411,10 +411,17 @@ Redis. The interface in `node_redis` is to return an individual `Multi` object }); ``` +### Multi.exec( callback ) + `client.multi()` is a constructor that returns a `Multi` object. `Multi` objects share all of the same command methods as `client` objects do. Commands are queued up inside the `Multi` object until `Multi.exec()` is invoked. +The `callback` of `.exec()` will get invoked with two arguments: + +* `err` **type:** `null | Array` err is either null or an array of Error Objects corresponding the the sequence the commands where chained. The last item of the array will always be an `EXECABORT` type of error originating from the `.exec()` itself. +* `results` **type:** `null | Array` results is an array of responses corresponding the the sequence the commands where chained. + You can either chain together `MULTI` commands as in the above example, or you can queue individual commands while still sending regular client command as in this example: