-
-
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
Add new method TokensList::getPreviousOfType + manage list of types in TokensList::getPreviousOfType and TokensList::getNextOfType #429
Conversation
…n TokensList::getPreviousOfType and TokensList::getNextOfType
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 @Tithugues
Are this changes used in some other PR on in of your implementations ?
I'm working with @Tithugues IRL and yes, we are expecting to use this (especially the Without entering into business details, we are working on SQL files that can define metadata on SQL statements, basically in the same state of art than PHP Attributes. So, from a statement, we need to parse the bound metadata written in a bash comment (similar to PHP Attribute, and complient with MySQL/MariaDB as such metadata can't be understood by such DBMS) which is written before the statement declaration, so we need to go back. As But not only for our needs, we both are confident that such feature could really help into parsing some complex options or statements into sql-parser in the future, or simplify some parsing methods that are juggling with |
That's awesome to some level !!!
Very nice, be sure to upstream as much possible, we would love to benefit from your feedback and implementations |
Yes, we are 🙂
I'll discuss with @Tithugues tomorrow to see if we could share an example of the benefits this PR could bring. |
So cool !, for sure you can mail me at williamdes [at] wdes dot fr |
These changes aims to:
Changes were done in a backward compatible way.
I intentionally didn't change all the
getNextOfType*
methods, as other methods have an additional filter which does not always make sense to combine with an array of types.Additionally, this PR relies on changes done in PR #428.