Skip to content
New issue

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

Fails to parse if DDL lacks semicolon or GO between statements. #90

Closed
n2ygk opened this issue Nov 11, 2021 · 4 comments
Closed

Fails to parse if DDL lacks semicolon or GO between statements. #90

n2ygk opened this issue Nov 11, 2021 · 4 comments

Comments

@n2ygk
Copy link

n2ygk commented Nov 11, 2021

Describe the bug
Fails to parse some ddl if there's no semicolon or GO in between statements.

This silently fails to produce output:

DROP TABLE IF EXISTS sample
CREATE TABLE sample
(
     sid BIGINT NOT NULL,
     foo CHAR(5),
     CONSTRAINT sample_key PRIMARY KEY NONCLUSTERED (sid)
)

While this succeeds (adds a semicolon).

DROP TABLE IF EXISTS sample;
CREATE TABLE sample
(
     sid BIGINT NOT NULL,
     foo CHAR(5),
     CONSTRAINT sample_key PRIMARY KEY NONCLUSTERED (sid)
)

To Reproduce

sdp sample_ddl.sql

Expected behavior
Parser output or an error message or non-zero exit code.

@xnuinside
Copy link
Owner

hi @n2ygk to be honest )) before your issue I leave all the time with thoughts that between different statements you need separator or you will get syntax error )

@n2ygk
Copy link
Author

n2ygk commented Nov 12, 2021 via email

@xnuinside
Copy link
Owner

@n2ygk I will add support of this in next release

@xnuinside
Copy link
Owner

@n2ygk fixes for both issues were released in version 0.22.0 - https://pypistats.org/packages/simple-ddl-parser . If you will find anything more - please feel free to open new issue and thank you one more time!

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

No branches or pull requests

2 participants