MCPcopy
hub / github.com/redis/node-redis / #createModuleCommand

Method #createModuleCommand

packages/client/lib/cluster/index.ts:192–206  ·  view source on GitHub ↗
(command: Command, resp: RespVersions)

Source from the content-addressed store, hash-verified

190 }
191
192 static #createModuleCommand(command: Command, resp: RespVersions) {
193 const transformReply = getTransformReply(command, resp);
194
195 return async function (this: NamespaceProxyCluster, ...args: Array<unknown>) {
196 const parser = new BasicCommandParser(this._self._keyPrefix);
197 command.parseCommand(parser, ...args);
198
199 return this._self._execute(
200 parser.firstKey,
201 command.IS_READ_ONLY,
202 this._self._commandOptions,
203 (client, opts) => client._executeCommand(command, parser, opts, transformReply)
204 );
205 };
206 }
207
208 static #createFunctionCommand(name: string, fn: RedisFunction, resp: RespVersions) {
209 const prefix = functionArgumentsPrefix(name, fn);

Callers

nothing calls this directly

Calls 3

getTransformReplyFunction · 0.90
_executeCommandMethod · 0.80
_executeMethod · 0.45

Tested by

no test coverage detected