From 21a2e9edcd35c332687d817ec8419d6b05651165 Mon Sep 17 00:00:00 2001 From: Nathan Friedly Date: Mon, 1 Jul 2024 17:03:19 -0400 Subject: [PATCH 1/3] docs: usage with node-redis in cluster mode Please double-check this @gamemaker1 & @Gandalf1783 Fixes #207 (hopefully) --- readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.md b/readme.md index e7e9c34..ba8322a 100644 --- a/readme.md +++ b/readme.md @@ -140,6 +140,7 @@ below: | Library | Function | | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------- | | [`node-redis`](https://github.com/redis/node-redis) | `async (...args: string[]) => client.sendCommand(args)` | +| [`node-redis`](https://github.com/redis/node-redis) (cluster) | `async (...args) => cluster.sendCommand(undefined, false, args)` | | [`ioredis`](https://github.com/luin/ioredis) | `async (command: string, ...args: string[]) => client.send_command(command, ...args)` | | [`handy-redis`](https://github.com/mmkal/handy-redis) | `async (...args: string[]) => client.nodeRedis.sendCommand(args)` | | [`tedis`](https://github.com/silkjs/tedis) | `async (...args: string[]) => client.command(...args)` | From f3bbada5a38b2c3dd82fde733aed7d9df07f6c69 Mon Sep 17 00:00:00 2001 From: Nathan Friedly Date: Wed, 13 Aug 2025 12:11:50 -0400 Subject: [PATCH 2/3] Fix command routing use args[1] for firstKey instead of undefined so that commands are routed to the correct node instead of a random one. --- readme.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/readme.md b/readme.md index 980c1f6..37fbc89 100644 --- a/readme.md +++ b/readme.md @@ -137,16 +137,16 @@ follows: The raw command sending function varies from library to library; some are given below: -| Library | Function | -| ------------------------------------------------------------------ | ------------------------------------------------------------------------------------- | -| [`node-redis`](https://github.com/redis/node-redis) | `async (...args: string[]) => client.sendCommand(args)` | -| [`node-redis`](https://github.com/redis/node-redis) (cluster) | `async (...args) => cluster.sendCommand(undefined, false, args)` | -| [`ioredis`](https://github.com/luin/ioredis) | `async (command: string, ...args: string[]) => client.call(command, ...args)` | -| [`handy-redis`](https://github.com/mmkal/handy-redis) | `async (...args: string[]) => client.nodeRedis.sendCommand(args)` | -| [`tedis`](https://github.com/silkjs/tedis) | `async (...args: string[]) => client.command(...args)` | -| [`redis-fast-driver`](https://github.com/h0x91b/redis-fast-driver) | `async (...args: string[]) => client.rawCallAsync(args)` | -| [`yoredis`](https://github.com/djanowski/yoredis) | `async (...args: string[]) => (await client.callMany([args]))[0]` | -| [`noderis`](https://github.com/wallneradam/noderis) | `async (...args: string[]) => client.callRedis(...args)` | +| Library | Function | +| ------------------------------------------------------------------ | ----------------------------------------------------------------------------------- | +| [`node-redis`](https://github.com/redis/node-redis) | `async (...args: string[]) => client.sendCommand(args)` | +| [`node-redis`](https://github.com/redis/node-redis) (cluster) | `async (...args) => cluster.sendCommand(args[1], false, args)` | +| [`ioredis`](https://github.com/luin/ioredis) | `async (command: string, ...args: string[]) => client.call(command, ...args)` | +| [`handy-redis`](https://github.com/mmkal/handy-redis) | `async (...args: string[]) => client.nodeRedis.sendCommand(args)` | +| [`tedis`](https://github.com/silkjs/tedis) | `async (...args: string[]) => client.command(...args)` | +| [`redis-fast-driver`](https://github.com/h0x91b/redis-fast-driver) | `async (...args: string[]) => client.rawCallAsync(args)` | +| [`yoredis`](https://github.com/djanowski/yoredis) | `async (...args: string[]) => (await client.callMany([args]))[0]` | +| [`noderis`](https://github.com/wallneradam/noderis) | `async (...args: string[]) => client.callRedis(...args)` | #### `prefix` From 7225067900c2ec7b32cba4f08aecad77f42a8039 Mon Sep 17 00:00:00 2001 From: Nathan Friedly Date: Wed, 13 Aug 2025 12:16:07 -0400 Subject: [PATCH 3/3] formatting --- readme.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/readme.md b/readme.md index 37fbc89..126510a 100644 --- a/readme.md +++ b/readme.md @@ -137,16 +137,16 @@ follows: The raw command sending function varies from library to library; some are given below: -| Library | Function | -| ------------------------------------------------------------------ | ----------------------------------------------------------------------------------- | -| [`node-redis`](https://github.com/redis/node-redis) | `async (...args: string[]) => client.sendCommand(args)` | -| [`node-redis`](https://github.com/redis/node-redis) (cluster) | `async (...args) => cluster.sendCommand(args[1], false, args)` | -| [`ioredis`](https://github.com/luin/ioredis) | `async (command: string, ...args: string[]) => client.call(command, ...args)` | -| [`handy-redis`](https://github.com/mmkal/handy-redis) | `async (...args: string[]) => client.nodeRedis.sendCommand(args)` | -| [`tedis`](https://github.com/silkjs/tedis) | `async (...args: string[]) => client.command(...args)` | -| [`redis-fast-driver`](https://github.com/h0x91b/redis-fast-driver) | `async (...args: string[]) => client.rawCallAsync(args)` | -| [`yoredis`](https://github.com/djanowski/yoredis) | `async (...args: string[]) => (await client.callMany([args]))[0]` | -| [`noderis`](https://github.com/wallneradam/noderis) | `async (...args: string[]) => client.callRedis(...args)` | +| Library | Function | +| ------------------------------------------------------------------ | ----------------------------------------------------------------------------- | +| [`node-redis`](https://github.com/redis/node-redis) | `async (...args: string[]) => client.sendCommand(args)` | +| [`node-redis`](https://github.com/redis/node-redis) (cluster) | `async (...args) => cluster.sendCommand(args[1], false, args)` | +| [`ioredis`](https://github.com/luin/ioredis) | `async (command: string, ...args: string[]) => client.call(command, ...args)` | +| [`handy-redis`](https://github.com/mmkal/handy-redis) | `async (...args: string[]) => client.nodeRedis.sendCommand(args)` | +| [`tedis`](https://github.com/silkjs/tedis) | `async (...args: string[]) => client.command(...args)` | +| [`redis-fast-driver`](https://github.com/h0x91b/redis-fast-driver) | `async (...args: string[]) => client.rawCallAsync(args)` | +| [`yoredis`](https://github.com/djanowski/yoredis) | `async (...args: string[]) => (await client.callMany([args]))[0]` | +| [`noderis`](https://github.com/wallneradam/noderis) | `async (...args: string[]) => client.callRedis(...args)` | #### `prefix`