feat: export query results to CSV, JSON, SQL INSERT, and TSV#23
Merged
Conversation
Add Ctrl+S in results view to open an export format picker dialog. Supports exporting to CSV, JSON, SQL INSERT statements, TSV, or copying to clipboard. Files are saved with timestamped filenames (pgrsql_export_YYYYMMDD_HHMMSS.ext). Proper handling of NULL values, special characters, and SQL escaping across all formats. - New src/export.rs module with format-specific serializers - Export format picker dialog with keyboard navigation (1-5 quick select) - 9 unit tests for export formatting and edge cases - Help overlay updated with Ctrl+S keybinding Closes #13 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Combine imports from both branches: EXPORT_FORMATS from the export feature and is_sql_function from the advanced SQL highlighting. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
Adds multi-format export for query results, addressing #13.
pgrsql_export_YYYYMMDD_HHMMSS.{ext}nullin JSON,NULLin SQLExport Formats
Changes
src/export.rsto_csv(),to_json(),to_sql_insert(),to_tsv()with helperssrc/main.rsmod exportsrc/ui/app.rsExportFormatenum,Focus::ExportPicker,handle_export_input(),perform_export()src/ui/components.rsdraw_export_picker()dialog, updated help overlayTest plan
cargo fmtcleanCloses #13
🤖 Generated with Claude Code