(msg)
| 26 | |
| 27 | // adds a command complete message |
| 28 | addCommandComplete(msg) { |
| 29 | let match |
| 30 | if (msg.text) { |
| 31 | // pure javascript |
| 32 | match = matchRegexp.exec(msg.text) |
| 33 | } else { |
| 34 | // native bindings |
| 35 | match = matchRegexp.exec(msg.command) |
| 36 | } |
| 37 | if (match) { |
| 38 | this.command = match[1] |
| 39 | if (match[3]) { |
| 40 | // COMMAND OID ROWS |
| 41 | this.oid = parseInt(match[2], 10) |
| 42 | this.rowCount = parseInt(match[3], 10) |
| 43 | } else if (match[2]) { |
| 44 | // COMMAND ROWS |
| 45 | this.rowCount = parseInt(match[2], 10) |
| 46 | } |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | _parseRowAsArray(rowData) { |
| 51 | const row = new Array(rowData.length) |
no outgoing calls
no test coverage detected