Skip to content

Commit c2baaf5

Browse files
committed
Resolved the issue where a string was being compared to a number
1 parent dc87e83 commit c2baaf5

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/views/results/html.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,8 @@ export function generateScroller(basicSelect: string, isCL: boolean, withCancel?
379379
if (data.rows === undefined && totalRows === 0) {
380380
document.getElementById(messageSpanId).innerText = 'Statement executed with no result set returned. Rows affected: ' + data.update_count;
381381
} else {
382-
if (data.executionTime > 0) {
383-
document.getElementById(statusId).innerText = (noMoreRows ? ('Loaded ' + totalRows + ' rows in ' + data.executionTime + 'ms. End of data.') : ('Loaded ' + totalRows + ' rows in ' + data.executionTime + 'ms. More available.')) + ' ' + (updateTable ? 'Updatable.' : '');
382+
if (data.executionTime) {
383+
document.getElementById(statusId).innerText = (noMoreRows ? ('Loaded ' + totalRows + ' rows in ' + data.executionTime.toFixed() + 'ms. End of data.') : ('Loaded ' + totalRows + ' rows in ' + data.executionTime.toFixed() + 'ms. More available.')) + ' ' + (updateTable ? 'Updatable.' : '');
384384
}
385385
else {
386386
document.getElementById(statusId).innerText = (noMoreRows ? ('Loaded ' + totalRows + ' rows. End of data.') : ('Loaded ' + totalRows + ' rows. More available.')) + ' ' + (updateTable ? 'Updatable.' : '');

src/views/results/resultSetPanelProvider.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,16 @@ export class ResultSetPanelProvider implements WebviewViewProvider {
102102
let queryResults = undefined;
103103
let startTime = 0;
104104
let endTime = 0;
105+
let executionTime: number|undefined;
106+
105107
if (this.currentQuery.getState() == "RUN_MORE_DATA_AVAILABLE") {
106108
queryResults = await this.currentQuery.fetchMore();
107109
}
108110
else {
109111
startTime = performance.now();
110112
queryResults = await this.currentQuery.execute();
111113
endTime = performance.now();
114+
executionTime = (endTime - startTime)
112115
}
113116
const jobId = this.currentQuery.getHostJob().id;
114117

@@ -121,7 +124,7 @@ export class ResultSetPanelProvider implements WebviewViewProvider {
121124
queryId: this.currentQuery.getId(),
122125
update_count: queryResults.update_count,
123126
isDone: queryResults.is_done,
124-
executionTime: (endTime - startTime).toFixed()
127+
executionTime
125128
});
126129
}
127130

0 commit comments

Comments
 (0)