feat(grid): copy column values as list or SQL IN clause#482
Open
pokertour wants to merge 1 commit into
Open
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (5 files)
Reviewed by kimi-k2.6 · Input: 109.9K · Output: 8.7K · Cached: 358.8K |
Contributor
Author
|
Waiting clarification on the issue about the way to export data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #459
What
Adds two entries to the results grid context menus to copy the values of a single column:
nullfor NULL cells, same formatting as the existing cell copy).1, 2, 3), strings quoted with''escaping ('O''Brien'),NULLfor nulls — reusing the same value rendering as the existing Copy as SQL INSERT.Both entries appear in:
Implementation
src/utils/clipboard.ts(columnValuesToText,columnValuesToInClause), onecopyColumnValuescallback inDataGrid.tsx, menu items, en/fr i18n keys.src/utils/clipboard.test.tswith 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.