Skip to content

Commit 0ad9cdd

Browse files
committed
Address review comments and fix formatting.
1 parent c3b2e9d commit 0ad9cdd

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

extensions/ql-vscode/src/adapt.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export interface RawResultSet {
3333

3434
function adaptKind(kind: ColumnKind): ColumnType {
3535
// XXX what about 'u'?
36-
if (kind == 'e') {
36+
if (kind === 'e') {
3737
return { type: 'e', primitiveType: 's', locationStyle: LocationStyle.FivePart, hasLabel: true }
3838
}
3939
else {
@@ -57,21 +57,21 @@ export function adaptSchema(schema: ResultSetSchema): AdaptedSchema {
5757
export function adaptValue(val: ColumnValue): ResultValue {
5858
// XXX taking a lot of incorrect shortcuts here
5959

60-
if (typeof val == 'string') {
60+
if (typeof val === 'string') {
6161
return val;
6262
}
6363

64-
if (typeof val == 'number' || typeof val == 'boolean') {
64+
if (typeof val === 'number' || typeof val === 'boolean') {
6565
return val + '';
6666
}
6767

6868
const url = val.url;
6969

70-
if (typeof url == 'string') {
70+
if (typeof url === 'string') {
7171
return url;
7272
}
7373

74-
if (url == undefined) {
74+
if (url === undefined) {
7575
return 'none';
7676
}
7777

extensions/ql-vscode/src/interface.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,9 @@ export class InterfaceManager extends DisposableObject {
367367

368368
if (EXPERIMENTAL_BQRS_SETTING.getValue()) {
369369
resultSets = [];
370-
const pageSize = 100;
370+
// Setting pageSize very large for now for the sake of
371+
// performance testing of vscode on containers.
372+
const pageSize = 1e20;
371373
const schemas = await this.cliServer.bqrsInfo(results.query.resultsPaths.resultsPath, pageSize);
372374
for (const schema of schemas["result-sets"]) {
373375
const chunk = await this.cliServer.bqrsDecode(results.query.resultsPaths.resultsPath, schema.name, pageSize, 0)

extensions/ql-vscode/src/view/results.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ async function* getChunkIterator(response: Response): AsyncIterableIterator<Uint
4545
}
4646
}
4747

48-
function translatePrimitiveValue(value: PrimitiveColumnValue, type: PrimitiveTypeKind):
49-
ResultValue {
50-
48+
function translatePrimitiveValue(value: PrimitiveColumnValue, type: PrimitiveTypeKind): ResultValue {
5149
switch (type) {
5250
case 'i':
5351
case 'f':

0 commit comments

Comments
 (0)