Skip to content

Commit 2af6211

Browse files
committed
Add update count to user message when no results are returned
1 parent 5b9f411 commit 2af6211

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
@@ -106,7 +106,7 @@ export function generateScroller(basicSelect: string, isCL: boolean): string {
106106
107107
const nextButton = document.getElementById("nextButton");
108108
if (data.rows === undefined && totalRows === 0) {
109-
nextButton.innerText = 'Query executed with no result set returned.';
109+
nextButton.innerText = 'Query executed with no result set returned. Rows affected: ' + data.update_count;
110110
} else {
111111
nextButton.innerText = noMoreRows ? ('Loaded ' + totalRows + '. End of data') : ('Loaded ' + totalRows + '. Fetching more...');
112112
}

src/views/results/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ class ResultSetPanelProvider {
5151
command: `rows`,
5252
rows: queryResults.data,
5353
queryId: queryObject.getId(),
54+
update_count: queryResults.update_count,
5455
isDone: queryResults.is_done
5556
});
5657

0 commit comments

Comments
 (0)