export: support external plugin drivers (CSV/JSON)#366
Open
danielnuld wants to merge 1 commit into
Open
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 file)
Reviewed by kimi-k2.7-code-20260612 · Input: 60.5K · Output: 9.6K · Cached: 915.5K |
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.
Problem
export_query_to_file(the Export as CSV/JSON action in the SQL editor) onlysupports the built-in drivers —
stream_to_sinkmatchesmysql/postgres/sqliteand returns
Unsupported driver for export: <id>for every external plugin driver.So users on plugin-backed connections (e.g. the IBM Informix plugin) can't export.
Change
Adds a fallback branch for plugin drivers in
src-tauri/src/export.rs: it looksup the registered driver via
registry::get_driverand pages through the driver'sown
execute_query(1000 rows/page), forwarding every row to the existingRowSink(CSV or JSON). Built-in drivers are untouched and still stream directly.The loop stops when a page returns no rows or
pagination.has_moreis false(falling back to "fewer than a full page" when a driver doesn't report pagination),
so non-SELECT statements terminate immediately. Progress/cancellation are handled
by the existing
on_rowclosure, so the cancel button and progress modal keepworking for plugins too.
Notes
cargo checkhere — theopenssl-sysvendored build needs
perl, which isn't available in my shell (unrelated tothis change). The patch mirrors the existing built-in dispatch and the driver
trait signature exactly; CI should confirm the build.