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

Method #createCommand

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

Source from the content-addressed store, hash-verified

174 // POLICIES extends CommandPolicies
175> extends EventEmitter {
176 static #createCommand(command: Command, resp: RespVersions) {
177 const transformReply = getTransformReply(command, resp);
178
179 return async function (this: ProxyCluster, ...args: Array<unknown>) {
180 const parser = new BasicCommandParser(this._self._keyPrefix);
181 command.parseCommand(parser, ...args);
182
183 return this._self._execute(
184 parser.firstKey,
185 command.IS_READ_ONLY,
186 this._commandOptions,
187 (client, opts) => client._executeCommand(command, parser, opts, transformReply)
188 );
189 };
190 }
191
192 static #createModuleCommand(command: Command, resp: RespVersions) {
193 const transformReply = getTransformReply(command, resp);

Callers

nothing calls this directly

Calls 3

getTransformReplyFunction · 0.90
_executeCommandMethod · 0.80
_executeMethod · 0.45

Tested by

no test coverage detected