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

Method #createCommand

packages/client/lib/client/pool.ts:118–127  ·  view source on GitHub ↗
(command: Command, resp: RespVersions)

Source from the content-addressed store, hash-verified

116 TYPE_MAPPING extends TypeMapping = {}
117> extends EventEmitter {
118 static #createCommand(command: Command, resp: RespVersions) {
119 const transformReply = getTransformReply(command, resp);
120
121 return async function (this: ProxyPool, ...args: Array<unknown>) {
122 const parser = new BasicCommandParser(this._self._keyPrefix);
123 command.parseCommand(parser, ...args);
124
125 return this.execute(client => client._executeCommand(command, parser, this._commandOptions, transformReply))
126 };
127 }
128
129 static #createModuleCommand(command: Command, resp: RespVersions) {
130 const transformReply = getTransformReply(command, resp);

Callers

nothing calls this directly

Calls 3

executeMethod · 0.95
getTransformReplyFunction · 0.90
_executeCommandMethod · 0.80

Tested by

no test coverage detected