fix(grid): preserve exact totals beyond the result row limit
Closes #6786
This commit is contained in:
1 parent
b4015a4393
commit
69e5e81071
5 files changed
+61
-15
No files matched your search
@@ -4115,7 +4115,6 @@ export const useQueryStore = defineStore("query", () => {
|
||||
traceId: string;
|
||||
elapsed: () => string;
|
||||
timeoutSecs: number;
|
||||
maxRows?: number;
|
||||
}) {
|
||||
const resultRowCount = options.result.rows.length;
|
||||
if (resultRowCount <= 0) {
|
||||
@@ -4158,11 +4157,12 @@ export const useQueryStore = defineStore("query", () => {
|
||||
setQueryTotalRowCountIfCurrent(options.tabId, options.executionId, options.result, undefined);
|
||||
return;
|
||||
}
|
||||
const cappedTotal = capQueryResultTotal(total, options.maxRows);
|
||||
setQueryTotalRowCountIfCurrent(options.tabId, options.executionId, options.result, cappedTotal);
|
||||
// COUNT describes all matching rows; the configured result limit only
|
||||
// constrains how many of them pagination may load and retain.
|
||||
setQueryTotalRowCountIfCurrent(options.tabId, options.executionId, options.result, total);
|
||||
queryExecutionLog("info", "count:done", {
|
||||
traceId: options.traceId,
|
||||
total: cappedTotal,
|
||||
total,
|
||||
elapsed: options.elapsed(),
|
||||
});
|
||||
} catch (error) {
|
||||
@@ -5151,7 +5151,6 @@ export const useQueryStore = defineStore("query", () => {
|
||||
traceId,
|
||||
elapsed,
|
||||
timeoutSecs: queryTimeoutSecs,
|
||||
maxRows: queryResultMaxRows,
|
||||
});
|
||||
}
|
||||
queryExecutionLog("info", "result:assigned", {
|
||||
|
||||
Reference in new issue
Block a user