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

PHPSQLCreator doesn't seem to support /*comment*/ "unknown [expr_type] = comment in "WHERE" [x]" #367

Open
ParleyHammon opened this issue Oct 13, 2022 · 1 comment

Comments

@ParleyHammon
Copy link

ParleyHammon commented Oct 13, 2022

I have version v4.5.0

When I create a WHERE statement like
WHERE s.status_id != 8 /*Pending*/
parse it then try to create it from the parse
I get "unknown [expr_type] = comment in "WHERE" [x]"

The Parser seems to understand it: [{"expr_type":"comment","value":"\/*Pending*\/"}]

PHPSQLCreator just needs to add it back in

@ParleyHammon
Copy link
Author

What's even more interesting is PHPSQLParser mistook a comment like "# Set" as a colref
{"expr_type":"colref","base_expr":"# Set","no_quotes":{"delim":false,"parts":["# Set"]},"sub_tree":false}
So PHPSQLCreator added it back in and because PHPSQLCreator generates the query in one line it commented out the rest of the query.

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

1 participant