(command: Command)
| 208 | } |
| 209 | |
| 210 | sendCommand(command: Command): unknown { |
| 211 | if (this._transactions > 0) { |
| 212 | command.inTransaction = true; |
| 213 | } |
| 214 | |
| 215 | const position = this._queue.length; |
| 216 | command.pipelineIndex = position; |
| 217 | |
| 218 | command.promise |
| 219 | .then((result) => { |
| 220 | this.fillResult([null, result], position); |
| 221 | }) |
| 222 | .catch((error) => { |
| 223 | this.fillResult([error], position); |
| 224 | }); |
| 225 | |
| 226 | this._queue.push(command); |
| 227 | |
| 228 | return this; |
| 229 | } |
| 230 | |
| 231 | addBatch(commands) { |
| 232 | let command, commandName, args; |
no test coverage detected