You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -411,10 +411,17 @@ Redis. The interface in `node_redis` is to return an individual `Multi` object
411
411
});
412
412
```
413
413
414
+
### Multi.exec( callback )
415
+
414
416
`client.multi()` is a constructor that returns a `Multi` object. `Multi` objects share all of the
415
417
same command methods as `client` objects do. Commands are queued up inside the `Multi` object
416
418
until `Multi.exec()` is invoked.
417
419
420
+
The `callback` of `.exec()` will get invoked with two arguments:
421
+
422
+
*`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.
423
+
*`results`**type:**`null | Array` results is an array of responses corresponding the the sequence the commands where chained.
424
+
418
425
You can either chain together `MULTI` commands as in the above example, or you can queue individual
419
426
commands while still sending regular client command as in this example:
0 commit comments