(name: string, fn: RedisFunction, resp: RespVersions)
| 206 | } |
| 207 | |
| 208 | static #createFunctionCommand(name: string, fn: RedisFunction, resp: RespVersions) { |
| 209 | const prefix = functionArgumentsPrefix(name, fn); |
| 210 | const transformReply = getTransformReply(fn, resp); |
| 211 | |
| 212 | return async function (this: NamespaceProxyCluster, ...args: Array<unknown>) { |
| 213 | const parser = new BasicCommandParser(this._self._keyPrefix); |
| 214 | parser.push(...prefix); |
| 215 | fn.parseCommand(parser, ...args); |
| 216 | |
| 217 | return this._self._execute( |
| 218 | parser.firstKey, |
| 219 | fn.IS_READ_ONLY, |
| 220 | this._self._commandOptions, |
| 221 | (client, opts) => client._executeCommand(fn, parser, opts, transformReply) |
| 222 | ); |
| 223 | }; |
| 224 | } |
| 225 | |
| 226 | static #createScriptCommand(script: RedisScript, resp: RespVersions) { |
| 227 | const prefix = scriptArgumentsPrefix(script); |
nothing calls this directly
no test coverage detected