Repository navigation
Conversation
This branch has not been deployed
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.
📝 What changed?
BarSQL imported only CSV files and SQL scripts, through one long dialog. Now it imports JSON too, and every import goes through four steps: File, Preview, Columns and Import. A SQL script only needs File and Import.
jqprints them, load too. Each key becomes a column, in the order the keys first appear, and a row without a key getsNULLthere.jsonbon PostgreSQL,JSONon MySQL, text elsewhere). Numbers load exactly as written, so no digits are lost. Column types come from the values: whole numbers, decimals, booleans, dates and timestamps. A string stays text even when it looks like a number, so"007"keeps its zeros.nullstored in a json column comes back as SQLNULL, because the export writes both asnull.🧩 Type of change
🧪 Tested
📖 Docs
📌 Notes
CsvImportRequestandimport_csvbecameTableImportRequestandimport_table, with aTableFormatthat is eitherCsv(CsvOptions)orJson { keys }.preview_json_filesits next topreview_import_file.barsql_io::json_import, and format detection isbarsql_io::detect.serde_jsongains itsraw_valuefeature so values keep their exact text. No new crates; the release exe size wasn't measured.IMPORT_JSONcolumn type:jsonb,JSON,TEXT,NVARCHAR(MAX)orNullable(String)depending on the engine.import_dialog.rsplus one file per step underimport_dialog/.