Docs / Data grid and staged changes
Data grid and staged changes
Browsing, filtering, selection, inline editing and the pending-changes review flow.
Browsing
The grid is virtualized and paginated on the server. Pages hold 100 to 1,000 rows; QueryBench never loads a whole table just to display a page. Row stripes are computed from the absolute row index, so scrolling never changes an existing row's color.
- Apply multiple AND filters: equality, ranges, substring and prefix matches, and null checks. Values are parameterized; identifiers are quoted and validated.
- Sorting and pagination happen in Go. Table browsing orders by primary key, or by the selected sort plus primary-key tie breakers.
- Hide columns, inspect a row in the row inspector and copy individual fields.
- Empty results show the headers and a blank grid.
Selection and keyboard
- ↑ and ↓ move row selection and focus together. Hold ⇧ to select a range.
- Copy selected rows as plain text, JSON, HTML, Markdown, CSV (with or without a header row) or INSERT statements.
- ⌘ ⌫ stages deletion of the selected rows.
- ⌘ Z undoes staged changes, up to 100 steps. The SQL editor keeps its own undo history.
- ⌘ S finishes the active cell edit and commits staged changes.
Editing
Double-click a cell, or press Enter on a focused editable cell, to edit it. Text and JSON editors are available for large values. Edits are staged, not executed:
- Edited rows and cells stay yellow, deleted rows red, new rows green. Selected rows are blue regardless of staged operation.
- Table names with pending changes stay yellow in the sidebar.
- Drafts survive table, page and connection switches during the session. Closing the desktop app with drafts prompts before discarding them.
Review and commit
The three toolbar controls Discard, Review and Commit manage the pending queue. The review shows one compact row per change with an operation label, table name and truncated SQL. Expand a row for the full statement and bound values. Execution stays parameterized.
- PostgreSQL, MySQL, SQLite and DuckDB commit visual changes atomically.
- Updates check original values and reject stale edits. Deletes match the original primary key, including composite keys, falling back to all original columns when there is no key.
- Ambiguous matches roll back the batch. Nontransactional adapters report completed keys so a retry does not repeat successful changes.
- MySQL staged changes require InnoDB tables for rollback support.
Context menus
Right-click a table for persistent tabs, structure, overview, foreign-key diagrams, pinning, scripts, imports, cloning, truncation, deletion and exports. Right-click a cell for editing, paste, add, duplicate or delete rows, NULL and empty values, quick filters, copy-column values and row copying. Destructive operations open reviewable statements and respect No-Edit.