Repository navigation
Export and import tables, schemas and SQL files - #19
Merged
Merged
Conversation
Rows stream from each driver to the file in batches, with binary values in full. SQL scripts hold the structure (tables in foreign key order, keys added at the end) and INSERTs in each database's literals, with identity handling. Imports detect the encoding, delimiter and header, match columns by name, read spreadsheet-style numbers and dates, and run in one transaction. A round trip on every database checks it.
Export… on tables, views, other objects and schemas asks only for the format (SQL, CSV, CSV for Excel, JSON) and, for SQL, structure, data or both. Import data… previews the file with columns matched by name and offers the delimiter, header row and replacing the rows; a file can also become a new table with inferred types. Run SQL file… runs a script with progress and stops at the first error unless told otherwise. Context menus also no longer throw while closing.
FabioHAraujo
force-pushed
the
feat/export-import
branch
from
October 23, 2026 04:28
65959b6 to
146ff84
Compare
FabioHAraujo
marked this pull request as ready for review
October 23, 2026 04:28
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 #10
Closes #11
Closes #12
Closes #13
Closes #14
Problem and resulting behavior
There was no way to move data in or out of LowQuery beyond copying grid rows. This adds export and import that stay simple: few choices, sensible defaults, everything detected that can be.
.sqlfile, or one CSV/JSON per table.Backend:
Session::streamreads rows from each driver's cursor in batches (values in full, not cut to the grid preview) into a channel;transfer/writes SQL (structure fromobject_ddl, tables in foreign key order, exact literals per engine, identity handling, generated columns skipped), CSV and JSON, and imports with the same literal writer.Validation
transfer/round_trip.rson every database in CI: a table with quotes, line breaks, backslashes, accents, binary, JSON, dates, identity and generated columns is exported and loaded back from the SQL script (after dropping it), CSV, CSV for Excel and JSON (after deleting its rows); rows must match exactly, and the identity generator must accept a new row afterwards.bun test,svelte-check, clippy, fmt.Additional context
Includes the Oracle ORA-01002 fix from #18 (already on main) for the 0.5.2 release. Oracle binary values over 2000 bytes cannot be written as a SQL literal yet; CSV/JSON export them fine.