Skip to content

Conversation

SheldonKubor
Copy link
Contributor

Temporarily solve the issue 1875 #1875 .
Refactoring may take more time. And in my opinion, we should discuss how to refactor.

@manticore-projects
Copy link
Contributor

we should discuss how to refactor.

The DDL statements are a big mess, best illustrated here: https://manticore-projects.com/JSQLParser/syntax_snapshot.html#createtable
The syntax diagram does not even fit on the page.

I would like to advise for a refactoring which splits this one into many smaller, re-usable productions where grammar and code can be shared between CREATE and ALTER as much as possible -- based on the SQL:2016 standard.

A good blueprint maybe here: https://manticore-projects.com/SQL2016Parser/syntax.html#table-definition and https://manticore-projects.com/SQL2016Parser/syntax.html#alter-table-statement

@manticore-projects
Copy link
Contributor

Clean and neat as always, thanks a lot for working on this. Cheers!

@manticore-projects manticore-projects merged commit 98aa90c into JSQLParser:master Feb 7, 2024
@SheldonKubor SheldonKubor deleted the feat-issue-1875 branch February 7, 2024 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants