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
GH-310: Adds select validation to create view #311
GH-310: Adds select validation to create view #311
Conversation
Codecov Report
@@ Coverage Diff @@
## QA #311 +/- ##
============================================
- Coverage 99.73% 99.71% -0.03%
- Complexity 1899 1906 +7
============================================
Files 63 63
Lines 4581 4593 +12
============================================
+ Hits 4569 4580 +11
- Misses 12 13 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👏 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @aszenz! 👍
Left a comment/suggestion. Also, please rebase the branch over latest phpmyadmin/master
.
cdbed17
to
17a2aeb
Compare
17a2aeb
to
31e7c31
Compare
Made some changes based on these
This branch was originally made from QA, I switched both the pr and branch to master but now phpstan is complains about existing code and new code in the travis-ci. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aszenz I'm sorry for that earlier suggestion to rebase over master. I think QA might be the way to go.
@williamdes could you help decide which branch to target for this?
If all the tests pass and coverage is good, I'm okay to merge it once we decide on the target branch.
The view statement body was not being validated, used existing select statement to ensure that the view definition is correctly linted. Also updated generated parser tests in / out tests.
31e7c31
to
de56687
Compare
Rebased (downbased) onto QA |
Waiting on https://travis-ci.org/github/phpmyadmin/sql-parser/builds/721614968 now :) Passed 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 💯
Thank you @aszenz for your contribution and patience ! |
$token = $list->tokens[$list->idx]; | ||
if ($token->type === Token::TYPE_DELIMITER) { | ||
break; | ||
// Parsing the SELECT expression with and without the `AS` keyword |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @aszenz
Do you have an example of a create view without an AS
?
The view statement body was not being validated, used existing
select statement to ensure that the view definition is correctly
linted.
Also updated generated parser tests in / out tests.
Fixes #310