You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
Update readme about lower case commands
This commit is contained in:
@@ -551,9 +551,9 @@ the second word as first parameter:
|
|||||||
|
|
||||||
## client.send_command(command_name, args, callback)
|
## client.send_command(command_name, args, callback)
|
||||||
|
|
||||||
Used internally to send commands to Redis. For convenience, nearly all commands that are published on the Redis
|
Used internally to send commands to Redis. Nearly all Redis commands have been added to the `client` object.
|
||||||
Wiki have been added to the `client` object. However, if I missed any, or if new commands are introduced before
|
However, if new commands are introduced before this library is updated, you can use `send_command()` to send arbitrary commands to Redis.
|
||||||
this library is updated, you can use `send_command()` to send arbitrary commands to Redis.
|
The command has to be lower case.
|
||||||
|
|
||||||
All commands are sent as multi-bulk commands. `args` can either be an Array of arguments, or omitted.
|
All commands are sent as multi-bulk commands. `args` can either be an Array of arguments, or omitted.
|
||||||
|
|
||||||
|
2
index.js
2
index.js
@@ -692,7 +692,7 @@ function Command(command, args, sub_command, buffer_args, callback) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
RedisClient.prototype.send_command = function (command, args, callback) {
|
RedisClient.prototype.send_command = function (command, args, callback) {
|
||||||
var arg, command_obj, i, il, elem_count, buffer_args, stream = this.stream, command_str = "", buffered_writes = 0, last_arg_type, lcaseCommand;
|
var arg, command_obj, i, il, elem_count, buffer_args, stream = this.stream, command_str = "", buffered_writes = 0, last_arg_type;
|
||||||
|
|
||||||
if (typeof command !== "string") {
|
if (typeof command !== "string") {
|
||||||
throw new Error("First argument to send_command must be the command name string, not " + typeof command);
|
throw new Error("First argument to send_command must be the command name string, not " + typeof command);
|
||||||
|
Reference in New Issue
Block a user