You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
@@ -619,13 +619,15 @@ export default class RedisClient<
|
|||||||
return this.#isolationPool.use(fn);
|
return this.#isolationPool.use(fn);
|
||||||
}
|
}
|
||||||
|
|
||||||
multi(): RedisClientMultiCommandType<M, F, S> {
|
MULTI(): RedisClientMultiCommandType<M, F, S> {
|
||||||
return new (this as any).Multi(
|
return new (this as any).Multi(
|
||||||
this.multiExecutor.bind(this),
|
this.multiExecutor.bind(this),
|
||||||
this.#options?.legacyMode
|
this.#options?.legacyMode
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
multi = this.MULTI;
|
||||||
|
|
||||||
async multiExecutor(
|
async multiExecutor(
|
||||||
commands: Array<RedisMultiQueuedCommand>,
|
commands: Array<RedisMultiQueuedCommand>,
|
||||||
selectedDB?: number,
|
selectedDB?: number,
|
||||||
|
@@ -224,7 +224,7 @@ export default class RedisCluster<
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
multi(routing?: RedisCommandArgument): RedisClusterMultiCommandType<M, F, S> {
|
MULTI(routing?: RedisCommandArgument): RedisClusterMultiCommandType<M, F, S> {
|
||||||
return new this.#Multi(
|
return new this.#Multi(
|
||||||
(commands: Array<RedisMultiQueuedCommand>, firstKey?: RedisCommandArgument, chainId?: symbol) => {
|
(commands: Array<RedisMultiQueuedCommand>, firstKey?: RedisCommandArgument, chainId?: symbol) => {
|
||||||
return this.#execute(
|
return this.#execute(
|
||||||
@@ -237,6 +237,8 @@ export default class RedisCluster<
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
multi = this.MULTI;
|
||||||
|
|
||||||
getMasters(): Array<ClusterNode<M, F, S>> {
|
getMasters(): Array<ClusterNode<M, F, S>> {
|
||||||
return this.#slots.getMasters();
|
return this.#slots.getMasters();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user