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
Describe the bug When this data is parsed the table "student" is not returned by the parsed output.
student
DDL =
CREATE TABLE `department` ( `dept_name` varchar(20) NOT NULL, `building` varchar(15) DEFAULT NULL, `budget` decimal(12,2) DEFAULT NULL, PRIMARY KEY (`dept_name`) ) ; CREATE TABLE `student` ( `ID` varchar(5) NOT NULL, `name` varchar(20) NOT NULL, `dept_name` varchar(20) DEFAULT NULL, `tot_cred` decimal(3,0) DEFAULT NULL, `timestamp` datetime NOT NULL DEFAULT '2009-04-01 08:00:00', PRIMARY KEY (`ID`), KEY `dept_name` (`dept_name`), CONSTRAINT `student_ibfk_1` FOREIGN KEY (`dept_name`) REFERENCES `department` (`dept_name`) ON DELETE SET NULL ) ;
To Reproduce Steps to reproduce the behavior:
from simple_ddl_parser import DDLParser results_from_text = DDLParser(DDL).run(output_mode="mysql") print(results_from_text)
[{'alter': {}, 'checks': [], 'columns': [{'check': None, 'default': None, 'name': '`dept_name`', 'nullable': False, 'references': None, 'size': 20, 'type': 'varchar', 'unique': False}, {'check': None, 'default': 'NULL', 'name': '`building`', 'nullable': True, 'references': None, 'size': 15, 'type': 'varchar', 'unique': False}, {'check': None, 'default': 'NULL', 'name': '`budget`', 'nullable': True, 'references': None, 'size': (12, 2), 'type': 'decimal', 'unique': False}], 'index': [], 'partitioned_by': [], 'primary_key': ['`dept_name`'], 'schema': None, 'table_name': '`department`', 'tablespace': None}]
Expected behavior List of Dicts returned should contain both student and department tables
department
Desktop (please complete the following information):
Additional context just trying to parse a simple mysql DDL
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
When this data is parsed the table "
student
" is not returned by the parsed output.DDL =
To Reproduce
Steps to reproduce the behavior:
Expected behavior
List of Dicts returned should contain both
student
anddepartment
tablesDesktop (please complete the following information):
Additional context
just trying to parse a simple mysql DDL
The text was updated successfully, but these errors were encountered: