@@ -395,7 +395,7 @@ responses using JavaScript syntax.
395
395
``` js
396
396
client .hmset (" key" , " foo" , " bar" , " hello" , " world" );
397
397
398
- client .hgetall (" hosts " , function (err , value ) {
398
+ client .hgetall (" key " , function (err , value ) {
399
399
console .log (value .foo ); // > "bar"
400
400
console .log (value .hello ); // > "world"
401
401
});
@@ -639,7 +639,7 @@ client.watch("foo", function(watchError) {
639
639
* If err is null, it means Redis successfully attempted
640
640
* the operation.
641
641
*/
642
- if (execError) throw err ;
642
+ if (execError) throw execError ;
643
643
644
644
/**
645
645
* If results === null, it means that a concurrent client
@@ -676,7 +676,7 @@ clients.watcher.watch("foo", function(watchError) {
676
676
677
677
// if you comment out the next line, the transaction will work
678
678
clients .modifier .set (" foo" , Math .random (), setError => {
679
- if (setError) throw err ;
679
+ if (setError) throw setError ;
680
680
});
681
681
682
682
// using a setTimeout here to ensure that the MULTI/EXEC will come after the SET.
@@ -848,19 +848,19 @@ non-blocking ones may be queued up until after the blocking ones finish.
848
848
Another reason to use duplicate() is when multiple DBs on the same server are
849
849
accessed via the redis SELECT command. Each DB could use its own connection.
850
850
851
- ### ` client.send_command (command_name[, [args][, callback]]) `
851
+ ### ` client.sendCommand (command_name[, [args][, callback]]) `
852
852
853
853
All Redis commands have been added to the ` client ` object. However, if new
854
854
commands are introduced before this library is updated or if you want to add
855
- individual commands you can use ` send_command ()` to send arbitrary commands to
855
+ individual commands you can use ` sendCommand ()` to send arbitrary commands to
856
856
Redis.
857
857
858
858
All commands are sent as multi-bulk commands. ` args ` can either be an Array of
859
859
arguments, or omitted / set to undefined.
860
860
861
- ### ` redis.add_command (command_name) `
861
+ ### ` redis.addCommand (command_name) `
862
862
863
- Calling add_command will add a new command to the prototype. The exact command
863
+ Calling addCommand will add a new command to the prototype. The exact command
864
864
name will be used when calling using this new command. Using arbitrary arguments
865
865
is possible as with any other command.
866
866
0 commit comments