method

RedisClient.send

command: string,
args: string[]
): Promise<any>;

Send a raw command to the Redis server

@param command

The command to send

@param args

The arguments to the command

@returns

A promise that resolves with the command result

The reply is converted as follows. See the type conversion section in docs/runtime/redis.mdx.

  • A simple, bulk or verbatim string becomes a string. Methods that return a Buffer, such as getBuffer, keep the bytes.
  • An integer becomes a number.
  • A double becomes a number.
  • A big number becomes a bigint. When its payload is not an integer literal it becomes a string.
  • A boolean becomes a boolean.
  • A null, a null bulk string and a null array become null.
  • An array becomes an array.
  • A set becomes an array.
  • A map becomes a plain object with a null prototype.
  • An error reply (- or !) rejects the promise with code ERR_REDIS_SERVER_ERROR.