Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ui/chen/components/ConsolePanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ function scrollToLatest() {

function resultSummary(result: ChenConsoleTimelineResult) {
const shown = result.data.data.length;
if (result.state.truncated) {
const limit =
typeof result.state.rowLimit === "number" && result.state.rowLimit > 0 ? result.state.rowLimit : shown;
return `${shown} shown · truncated at ${limit}`;
}
const total = typeof result.state.total === "number" && result.state.total >= 0 ? result.state.total : shown;
return total > shown ? `${shown} shown · ${total} total` : `${shown} ${shown === 1 ? "row" : "rows"}`;
}
Expand Down
2 changes: 1 addition & 1 deletion ui/chen/composables/useChenQueryConsole.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function useChenQueryConsole(
const entry = activeConsoleEntry(tab);
if (!entry) return;

if (/^execute sql\s*:/i.test(content)) return;
if (/^execute(?: raw)? sql\s*:/i.test(content)) return;
if (/^cancel query\s*:/i.test(content)) {
if (!entry.logs.includes("Query cancelled.")) entry.logs.push("Query cancelled.");
entry.status = "cancelled";
Expand Down
2 changes: 2 additions & 0 deletions ui/chen/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ export interface ChenConsoleState {
limit?: number;
total?: number;
paged?: boolean;
truncated?: boolean;
rowLimit?: number;
pinned?: boolean;
[key: string]: any;
}
Expand Down
Loading