Skip to content

Commit 28b9701

Browse files
authored
fix #2318 - add MULTI (uppercase) (#2324)
1 parent d923f71 commit 28b9701

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/client/lib/client/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,13 +619,15 @@ export default class RedisClient<
619619
return this.#isolationPool.use(fn);
620620
}
621621

622-
multi(): RedisClientMultiCommandType<M, F, S> {
622+
MULTI(): RedisClientMultiCommandType<M, F, S> {
623623
return new (this as any).Multi(
624624
this.multiExecutor.bind(this),
625625
this.#options?.legacyMode
626626
);
627627
}
628628

629+
multi = this.MULTI;
630+
629631
async multiExecutor(
630632
commands: Array<RedisMultiQueuedCommand>,
631633
selectedDB?: number,

packages/client/lib/cluster/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ export default class RedisCluster<
224224
}
225225
}
226226

227-
multi(routing?: RedisCommandArgument): RedisClusterMultiCommandType<M, F, S> {
227+
MULTI(routing?: RedisCommandArgument): RedisClusterMultiCommandType<M, F, S> {
228228
return new this.#Multi(
229229
(commands: Array<RedisMultiQueuedCommand>, firstKey?: RedisCommandArgument, chainId?: symbol) => {
230230
return this.#execute(
@@ -237,6 +237,8 @@ export default class RedisCluster<
237237
);
238238
}
239239

240+
multi = this.MULTI;
241+
240242
getMasters(): Array<ClusterNode<M, F, S>> {
241243
return this.#slots.getMasters();
242244
}

0 commit comments

Comments
 (0)