Skip to content

Commit 30d01cb

Browse files
authored
Merge pull request #1007 from github/aeisenberg/sorted-result-sets
Ensure all result set names are loaded
2 parents 2584971 + 5ab55bb commit 30d01cb

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

extensions/ql-vscode/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- Allow case-insensitive project slugs for GitHub repositories when adding a CodeQL database from LGTM. [#978](https://github.com/github/vscode-codeql/pull/961)
1010
- Add a _CodeQL: Preview Query Help_ command to generate Markdown previews of `.qhelp` query help files. This command should only be run in trusted workspaces. See https://codeql.github.com/docs/codeql-cli/testing-query-help-files for more information about query help. [#988](https://github.com/github/vscode-codeql/pull/988)
1111
- Make "Open Referenced File" command accessible from the active editor menu. [#989](https://github.com/github/vscode-codeql/pull/989)
12+
- Fix a bug where result set names in the result set drop-down were disappearing when viewing a sorted table. [#1007](https://github.com/github/vscode-codeql/pull/1007)
1213
- Allow query result locations with 0 as the end column value. These are treated as the first column in the line. [#1002](https://github.com/github/vscode-codeql/pull/1002)
1314

1415
## 1.5.6 - 07 October 2021

extensions/ql-vscode/src/interface.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,7 @@ export class InterfaceManager extends DisposableObject {
365365
const showButton = 'View Results';
366366
const queryName = results.queryName;
367367
const resultPromise = vscode.window.showInformationMessage(
368-
`Finished running query ${
369-
queryName.length > 0 ? ` "${queryName}"` : ''
368+
`Finished running query ${queryName.length > 0 ? ` "${queryName}"` : ''
370369
}.`,
371370
showButton
372371
);
@@ -502,7 +501,12 @@ export class InterfaceManager extends DisposableObject {
502501
);
503502

504503
const resultSetSchemas = await this.getResultSetSchemas(results, sorted ? selectedTable : '');
505-
const resultSetNames = resultSetSchemas.map(schema => schema.name);
504+
505+
// If there is a specific sorted table selected, a different bqrs file is loaded that doesn't have all the result set names.
506+
// Make sure that we load all result set names here.
507+
// See https://github.com/github/vscode-codeql/issues/1005
508+
const allResultSetSchemas = sorted ? await this.getResultSetSchemas(results, '') : resultSetSchemas;
509+
const resultSetNames = allResultSetSchemas.map(schema => schema.name);
506510

507511
const schema = resultSetSchemas.find(
508512
(resultSet) => resultSet.name == selectedTable

0 commit comments

Comments
 (0)