Skip to content

feat(results): visual row selection and batch DELETE query generation#203

Open
pixelEDI wants to merge 2 commits into
Maxteabag:mainfrom
pixelEDI:feat/results-visual-multidelete
Open

feat(results): visual row selection and batch DELETE query generation#203
pixelEDI wants to merge 2 commits into
Maxteabag:mainfrom
pixelEDI:feat/results-visual-multidelete

Conversation

@pixelEDI
Copy link
Copy Markdown

Summary

  • Add visual row selection in Results (v, expand with j/k, exit with v/Esc)
  • Generate batch DELETE for selected rows via D
  • For single-PK tables, generate compact IN (...) clause and dedupe ids
  • Replace unrelated existing query text (e.g. previous SELECT) when generating
    DELETE

Why

Deleting multiple rows from results previously required single-row iteration and
manual query cleanup. This adds a fast, safe workflow for multi-row delete query
generation.

UX / Keybindings

  • v is intentionally used for selection because this is Vim-native behavior
    (visual selection), which fits existing sqlit keybinding conventions.

Notes

  • Keeps existing behavior for non-single-PK/mixed cases by falling back to OR
    predicates
  • Query generation still happens in editor first (user executes manually)

Testing

  • Manually tested in sqlit@dev:
    • visual selection highlighting
    • multi-row D delete generation
    • dedupe/merge behavior
    • replacing previous non-DELETE query text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant