Skip to content

feat(grid): copy column values as list or SQL IN clause#482

Open
pokertour wants to merge 1 commit into
TabularisDB:mainfrom
pokertour:feat/copy-column-values
Open

feat(grid): copy column values as list or SQL IN clause#482
pokertour wants to merge 1 commit into
TabularisDB:mainfrom
pokertour:feat/copy-column-values

Conversation

@pokertour

Copy link
Copy Markdown
Contributor

Closes #459

What

Adds two entries to the results grid context menus to copy the values of a single column:

  • Copy column values — newline-separated, one value per line (null for NULL cells, same formatting as the existing cell copy).
  • Copy column values (IN clause) — a ready-to-paste SQL list: numbers raw (1, 2, 3), strings quoted with '' escaping ('O''Brien'), NULL for nulls — reusing the same value rendering as the existing Copy as SQL INSERT.

Both entries appear in:

  • the cell context menu (applies to the clicked column), using the selected rows or all visible rows when nothing is selected — same fallback as Copy selected row(s);
  • the column header context menu, below the existing Copy column name entries.

Implementation

  • Two pure helpers in src/utils/clipboard.ts (columnValuesToText, columnValuesToInClause), one copyColumnValues callback in DataGrid.tsx, menu items, en/fr i18n keys.
  • New src/utils/clipboard.test.ts with 4 vitest cases (newline join, null label, IN quoting, quote escaping).

Note: #481 also creates clipboard.test.ts; whichever merges second will have a trivial conflict there (independent test blocks, concatenate).

Manually tested on Windows: both menus, with/without row selection, columns containing NULLs and strings with quotes, pasting the IN list into a query.

@kilo-code-bot

kilo-code-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (5 files)
  • src/components/ui/DataGrid.tsx
  • src/i18n/locales/en.json
  • src/i18n/locales/fr.json
  • src/utils/clipboard.test.ts
  • src/utils/clipboard.ts

Reviewed by kimi-k2.6 · Input: 109.9K · Output: 8.7K · Cached: 358.8K

@pokertour

Copy link
Copy Markdown
Contributor Author

Waiting clarification on the issue about the way to export data

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.

[Feat]: Copy Values of a Column

1 participant