feat: add query editor above result rows

This commit is contained in:
Valdemar Lorenzen
2026-10-19 14:04:36 +02:00
parent b15460d5f8
commit 49a3dbddcf
5 changed files with 460 additions and 66 deletions
+12 -5
View File
@@ -26,23 +26,30 @@ Expansion never runs shell commands. Quote CLI paths to let dbdash expand them.
PostgreSQL URLs and libpq-style key=value strings are accepted.
Use sslmode=require for mandatory TLS; certificates and hostnames are verified.
Use sslmode=disable only for trusted local connections.
The inspector needs 70×12 terminal cells; the PostgreSQL window needs 74×20.
The inspector needs 70×14 terminal cells; the PostgreSQL window needs 74×20.
Navigation:
Tab/Shift-Tab Switch between explorer and rows/schema (Esc returns to explorer)
Tab/Shift-Tab Cycle explorer, query editor, and rows/schema (Esc returns to explorer)
Up/Down, j/k Move selection; Enter connects/expands a database or opens a relation
Home/End, g/G First / last item
s Toggle rows and column schema
Left/Right Collapse/expand in explorer; scroll columns in rows/schema (h/l too)
n/p, PgDn/Up Next / previous 100-row page
n/p, PgDn/Up Next / previous 100-row relation page
c Add a configured database in a floating window
r Refresh relations and the active relation
Connected databases show their tables and views beneath them in the explorer.
Enter on the connected database collapses/expands it without reconnecting.
Navigation help spans the bottom as one line, wrapping only when needed.
The query editor sits above rows/results; the explorer spans both panes.
Explorer and rows/schema bottom borders align; relation/page/column status
appears in the rows/schema border. Read errors appear above that pane.
q / Ctrl-C Quit
appears in the rows/schema border. Read errors appear above the query editor.
In the query editor, type SQL directly; Enter inserts a newline. Arrow keys,
Home/End, Backspace/Delete, Ctrl-U (clear), and multiline pasting are supported.
F5 / Ctrl-Enter executes one SELECT/CTE on the current connection, showing up
to 100 rows below. Results report truncation; use SQL LIMIT/OFFSET for more.
Failed queries keep the previous results. Opening a relation restores browsing
without clearing the query text. Query text is not saved across connections.
q / Ctrl-C Quit (q is literal text in the query editor)
New database window: Up/Down chooses a provider; Enter starts editing.
Tab/Shift-Tab changes fields; Left/Right changes TLS when that field is focused.
Enter saves without connecting, including when the database is offline.