* Insert a row into the result
(row_data: Uint8Array[], controls?: ClientControls)
| 244 | * Insert a row into the result |
| 245 | */ |
| 246 | insertRow(row_data: Uint8Array[], controls?: ClientControls) { |
| 247 | if (!this.rowDescription) { |
| 248 | throw new Error( |
| 249 | "The row descriptions required to parse the result data weren't initialized", |
| 250 | ); |
| 251 | } |
| 252 | |
| 253 | // Row description won't be modified after initialization |
| 254 | const row = row_data.map((raw_value, index) => { |
| 255 | const column = this.rowDescription!.columns[index]; |
| 256 | |
| 257 | if (raw_value === null) { |
| 258 | return null; |
| 259 | } |
| 260 | return decode(raw_value, column, controls); |
| 261 | }) as T; |
| 262 | |
| 263 | this.rows.push(row); |
| 264 | } |
| 265 | } |
| 266 | |
| 267 | function findDuplicatesInArray(array: string[]): string[] { |
no test coverage detected