feat: multi-result tabs, column statistics, and Ctrl+W close tab

- ResultsPanel rewritten: single queries show one result as before;
  scripts with multiple statements show each result in a named sub-tab
  (e.g. "Result 2 (1,234)") with the tab bar auto-shown/hidden
- EditorTab._on_script_done now calls show_script_results() instead of
  overwriting the panel on each statement
- ColumnStatsDialog: right-click any column header in TableViewer to see
  total rows, null count, distinct values, min, max, and avg (async,
  gracefully skips avg for non-numeric columns)
- TableViewer header context menu also adds "Resize to fit" shortcuts
- Ctrl+W closes the current workspace tab (View menu)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-21 17:10:35 -04:00
co-authored by Claude Sonnet 4.6
parent 771c92b7b6
commit 9f0891755e
5 changed files with 334 additions and 81 deletions
+1 -5
View File
@@ -582,11 +582,7 @@ class EditorTab(QWidget):
self._maybe_invalidate_schema(self._editor.toPlainText())
def _on_script_done(self, results: list):
for cols, rows, cnt, msg in results:
if cols:
self._results.show_data(cols, rows, cnt, 0)
else:
self._results.show_message(msg)
self._results.show_script_results(results)
self._maybe_invalidate_schema(self._editor.toPlainText())
def _on_error(self, msg: str):