Skip to content

Commit

Permalink
Fix decoding of array types from PVWS
Browse files Browse the repository at this point in the history
  • Loading branch information
rjwills28 committed Dec 14, 2023
1 parent 4b3c072 commit d78d7cd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/connection/coniql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,23 +89,29 @@ function coniqlToDType(data: any): DType {
form: undefined,
choices: data.labels ? data.labels : undefined
});

let array = undefined;
if (data.b64int !== undefined) {
const bd = base64js.toByteArray(data.b64int);
array = new ARRAY_TYPES["INT8"](
array = new ARRAY_TYPES["INT32"](

Check failure on line 96 in src/connection/coniql.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Replace `⏎······bd.buffer⏎····` with `bd.buffer`
bd.buffer
);
// Convert to plain array, if necessary
array = Array.prototype.slice.call(array);
} else if (data.b64dbl !== undefined) {
const bd = base64js.toByteArray(data.b64dbl);
array = new ARRAY_TYPES["FLOAT64"](

Check failure on line 103 in src/connection/coniql.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Replace `⏎······bd.buffer⏎····` with `bd.buffer`
bd.buffer
);
// Convert to plain array, if necessary
array = Array.prototype.slice.call(array);
}
const datetime = new Date(0);
datetime.setSeconds(data.seconds);
const dtime = new DTime(datetime);

let stringVal = "";

Check failure on line 114 in src/connection/coniql.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Delete `··`
if (data.text !== undefined) {
stringVal = data.text;
}

Check failure on line 117 in src/connection/coniql.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Delete `⏎·`
Expand Down

0 comments on commit d78d7cd

Please sign in to comment.