Repository navigation
feat: parse SQLite WITHOUT ROWID and STRICT table options - #2903
Open
chinmayajha wants to merge 1 commit into
Open
chinmayajha wants to merge 1 commit into
chinmayajha wants to merge 1 commit into
Conversation
SQLite takes a comma-separated list of WITHOUT ROWID and STRICT after the column list. Both are now TableOption kinds, and the deparser keeps the comma SQLite requires between them. Part of JSQLParser#2852
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.
Part of #2852 (the
WITHOUT ROWIDandSTRICTpart;INSERT ORis in #2853 andUPDATE ORis in #2885).SQLite takes a comma-separated list of table options after the column list (lang_createtable). Neither option parses:
CreateTableOption()now readsWITHOUT ROWIDbefore the existingWITHOUT OIDSbranch, andSTRICTas its own option. Both get aTableOption.Kind(WITHOUT_ROWID,STRICT). SQLite needs the comma inWITHOUT ROWID, STRICT(sqlite3 rejectsWITHOUT ROWID STRICT), butappendTableOptionsTojoins options with a space, so it now writes,between two of these options and a space everywhere else. MySQL options print as before.SQLiteTestcovers each option, both orders and lower case, and checks the parsed kinds. Other uses ofSTRICTandWITHOUT(ClickHouseEXCEPT STRICT/REPLACE STRICT, functionSTRICT,STRICTas a name,WITHOUT OIDS,WITHOUT TIME ZONE) round-trip the same as on master.gradle checkpasses (on JDK 26, by overriding the 17 toolchain locally), andcheckGrammarAmbiguityreports no warnings.I used Claude to help write this, and I checked the change and the tests.