-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
WITH...AS parse errors #373
Comments
Hi, I'm not able to reproduce the same results in both Linting and highlighting using Linting and highlighting using which are correct, because the statement is not a valid with clause, a subsequent query that reference the expression defined, is missing, that's why a valid statement based on the changes introduced and discussed at #363, should be similar to: with foo as ( select * from products where bar in ('foo', 'bar')) SELECT * from foo; |
Hi folks, are you going to make any progress there? |
Hi @ivanavguston-oviva, I'd say that it's already fixed by #363 (not released yet), could you test with Aside from that the query mentioned here got tested on an old version that didn't include the patch #363, it is also not a valid |
While parsing a rather simple query |
What phpMyAdmin version are you using? |
This is THE FULL query. |
Ok, sorry for the noise, I've found an error in the unexpected place not related to your library. For those interested:
was producing an unquoted result, which, for the case of shell wildcard characters, grabbed a lot from the project directory listing. Given less than explanatory exception messages, and the sheer number of them, I was unable to concentrate on the input data passed to the parser. Which, in the hindsight, I should've checked sooner. The correct solution is to
(Note the quotes.) |
With the sql-parser version 5.5.0 that's included with my phpMyAdmin, I'm looking at the example WITH...AS statement:
This passes through the linter without errors.
Which when run through the highlighter provides this:
And that now gives an error through the linter:
It seems this is probably incorrect or improperly handled.
The text was updated successfully, but these errors were encountered: