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

Validation examples suggestions #27

Open
ReinierKoops opened this issue Jun 30, 2021 · 1 comment
Open

Validation examples suggestions #27

ReinierKoops opened this issue Jun 30, 2021 · 1 comment

Comments

@ReinierKoops
Copy link

Hi David-Wobrock,

I really like the idea of this repository.

I've tried this tool and found that the following query is validated as valid; maybe something to add to the test cases:

"SELECT Name FROM singer WHERE Birth_Year = 1948 OR Birth_Year = 1949 SELECT SELECT"
"SELECT Name FROM singer WHERE Birth_Year = 1948 OR WHERE Birth_Year = 1949"
"SELECT Name FROM singer WHERE Birth_Year = 1948 SELECT name FROM a WHERE"

@David-Wobrock
Copy link
Owner

Hi Reinier,
Thanks for your feedback!

I have to admit that the first purpose of the tool is to format valid SQL.
However, the ultimate goal would be that the tool can also both:

  • reliably validate the syntax (what you are requesting basically)
  • validate the semantics (e.g. raise if my outer SELECT-query is selecting fields that are not exposed by my subquery)

I believe that syntax validation would be sweet, but the tool is not ready for that yet. I'm still mainly focusing on formatting. Sorry!

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