We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from simple_ddl_parser import DDLParser ddl = """ CREATE TABLE Users ( user_id INT NOT NULL AUTO INCREMENT, username VARCHAR(100) NOT NULL, password VARCHAR(40) NOT NULL, submission_date DATE, PRIMARY KEY ( user_id ) ); """ result = DDLParser(ddl).run(output_mode="mysql") print(result)
output is
[{'primary_key': ['user_id']}]
if we remove AUTO INCREMENT however, input is now
from simple_ddl_parser import DDLParser ddl = """ CREATE TABLE Users ( user_id INT NOT NULL, username VARCHAR(100) NOT NULL, password VARCHAR(40) NOT NULL, submission_date DATE, PRIMARY KEY ( user_id ) ); """ result = DDLParser(ddl).run(output_mode="mysql") print(result)
and output is
[{'columns': [{'name': 'user_id', 'type': 'INT', 'size': None, 'references': None, 'unique': False, 'nullable': False, 'default': None, 'check': None}, {'name': 'username', 'type': 'VARCHAR', 'size': 100, 'references': None, 'unique': False, 'nullable': False, 'default': None, 'check': None}, {'name': 'password', 'type': 'VARCHAR', 'size': 40, 'references': None, 'unique': False, 'nullable': False, 'default': None, 'check': None}, {'name': 'submission_date', 'type': 'DATE', 'size': None, 'references': None, 'unique': False, 'nullable': True, 'default': None, 'check': None}], 'primary_key': ['user_id'], 'alter': {}, 'checks': [], 'index': [], 'partitioned_by': [], 'tablespace': None, 'constraints': {'uniques': None, 'checks': None, 'references': None}, 'schema': None, 'table_name': 'Users'}]```
The text was updated successfully, but these errors were encountered:
@rheophile10 hi! Thanks for great description:) I will try to fix the issue during the weekends
Sorry, something went wrong.
sorry for the delay, fix released in version 0.26.3 - https://github.com/xnuinside/simple-ddl-parser/blob/main/tests/test_simple_ddl_parser.py#L2698 test added. If will be any new issues - feel free to open new ticket @rheophile10 thank you!
No branches or pull requests
output is
if we remove AUTO INCREMENT however, input is now
and output is
The text was updated successfully, but these errors were encountered: