GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — fix: end column DEFAULT values before a top-level COLLATE by minleejae · Pull Request #2849 · JSQLParser/JSqlParser Conversation
|
| * Whether the target is not nested in brackets, braces, parentheses or a CASE expression opened | ||
| * from the first token on. | ||
| */ | ||
| static boolean isTopLevelFrom(Token first, Token target) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Why is this an Extra Class now? Why not show it like the other helper classes in the Grammar?
I would love to keep this consistent.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks, applied in 36ec002. It is now a nested class in the grammar.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Move TokenNesting from its own file into the grammar as a private nested class next to the lookaheads that use it, as asked in review. The nested class compiles to its own class file, so its branches stay out of CCJSqlParser.class. Inlining the walk as a parser method took 18 more of the constant-pool entries JaCoCo can still instrument. Behaviour does not change. Signed-off-by: minleejae <[email protected]>
Move AlterConstraintLookahead from its own file into the grammar as a private nested class, as done for TokenNesting in JSQLParser#2849. Split needsSharedTableConstraint into a check for the forms only the shared production accepts and a scan for constraint attributes. Codacy's PMD reported an NPath complexity of 440 for the combined method; the largest part is now 14. The nested class keeps its branches out of CCJSqlParser.class. Behaviour does not change. Signed-off-by: minleejae <[email protected]>
) * fix: reuse table constraints for ALTER TABLE ADD in every dialect ALTER TABLE ADD parsed table constraints with the shared CREATE TABLE production only for the MySQL and PostgreSQL dialects (#2612, #2654). Without one of them, the generic ALTER branches rejected forms that CREATE TABLE accepts in every dialect: an unnamed CHECK (c > 0), NOT VALID, DEFERRABLE INITIALLY DEFERRED, an unnamed FOREIGN KEY with attributes and EXCLUDE. Route an ADD to the shared production in every dialect when it uses a form that only that production accepts: an unnamed CHECK, FOREIGN KEY, EXCLUDE, or INITIALLY IMMEDIATE|DEFERRED, NOT VALID or ENFORCED outside a CHECK before the end of the action. Forms that already parsed keep their generic representation, accessors and output; the PostgreSQL-only UNIQUE USING INDEX and NOT NULL constraints still need that dialect. The scan lives in the package-private AlterConstraintLookahead, like RoutineBodyBoundary, because the generated CCJSqlParser class is close to the size JaCoCo can still instrument. Signed-off-by: minleejae <[email protected]> * fix: parse VALIDATE CONSTRAINT as a structured action in every dialect ALTER TABLE t VALIDATE CONSTRAINT ck was a structured RelationAlterAction only with the PostgreSQL dialect. Elsewhere the remaining text became an UNSPECIFIC expression, so the constraint name could not be read and the action could not follow an ADD that now parses in every dialect. VALIDATE CONSTRAINT starts no other ALTER TABLE action, so recognise it in every dialect. Its output is unchanged. Signed-off-by: minleejae <[email protected]> * refactor: keep the ALTER constraint lookahead in the grammar Move AlterConstraintLookahead from its own file into the grammar as a private nested class, as done for TokenNesting in #2849. Split needsSharedTableConstraint into a check for the forms only the shared production accepts and a scan for constraint attributes. Codacy's PMD reported an NPath complexity of 440 for the combined method; the largest part is now 14. The nested class keeps its branches out of CCJSqlParser.class. Behaviour does not change. Signed-off-by: minleejae <[email protected]> --------- Signed-off-by: minleejae <[email protected]>
There was an error while loading. Please reload this page.
|
Thank you much! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.