Skip to content

Commit 6fc6aaf

Browse files
authored
Merge pull request #108 from ThePrez/feat/numrowsupdated
Add update count to user message when no results are returned
2 parents eb13e7e + 2af6211 commit 6fc6aaf

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

src/connection/serverComponent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const octokit = new Octokit();
1414

1515
// During development, you can set the SERVER_VERSION in .vscode/launch.json
1616
// Otherwise, fall back to the working version
17-
const SERVER_VERSION = process.env[`SERVER_VERSION`] || `v1.1.0`;
17+
const SERVER_VERSION = process.env[`SERVER_VERSION`] || `v1.2.0`;
1818

1919
const ExecutablePathDir = `$HOME/.vscode/`;
2020

src/connection/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export interface QueryResult<T> extends ServerResponse {
4242
metadata: QueryMetaData,
4343
is_done: boolean;
4444
has_results: boolean;
45+
update_count: number;
4546
data: T[];
4647
}
4748

src/views/results/html.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export function generateScroller(basicSelect: string, isCL: boolean): string {
9797
9898
const nextButton = document.getElementById("nextButton");
9999
if (data.rows === undefined && totalRows === 0) {
100-
nextButton.innerText = 'Query executed with no result set returned.';
100+
nextButton.innerText = 'Query executed with no result set returned. Rows affected: ' + data.update_count;
101101
} else {
102102
nextButton.innerText = noMoreRows ? ('Loaded ' + totalRows + '. End of data') : ('Loaded ' + totalRows + '. Fetching more...');
103103
}

src/views/results/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class ResultSetPanelProvider {
5252
rows: queryResults.data,
5353
columnList: queryResults.metadata ? queryResults.metadata.columns.map(x=>x.name) : undefined, // Query.fetchMore() doesn't return the metadata
5454
queryId: queryObject.getId(),
55+
update_count: queryResults.update_count,
5556
isDone: queryResults.is_done
5657
});
5758

0 commit comments

Comments
 (0)