Merged
Conversation
This lexer add support for PostgreSQL Explain plan : https://www.postgresql.org/docs/current/sql-explain.html This was heavily inspired by Maxence Ahlouche work, thanks to him : https://github.com/maahl/pg_explain_lexer
jeanas
reviewed
Apr 1, 2023
jeanas
reviewed
Apr 1, 2023
jeanas
requested changes
Apr 1, 2023
Contributor
jeanas
left a comment
There was a problem hiding this comment.
LGTM with nits. Can you please add some tests too?
Contributor
Author
Thanks for your review! I will try to add some tests, but it will be hard to cover all the rules :/ |
Contributor
|
Now looks good (I added a commit to fix minor issues), only awaiting some tests. (See https://pygments.org/docs/contributing/#how-lexers-are-tested for how to add them.) |
Contributor
Author
|
Thanks! I added some tests. Unfortunately, it is hard to cover all keywords :( |
Contributor
|
No need to cover all elements of a |
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
I suggest this lexer to handle PostgreSQL execution plan obtained thanks to EXPLAIN command (https://www.postgresql.org/docs/current/sql-explain.html).
This work was inspired by Maxence Ahlouche work (https://github.com/maahl/pg_explain_lexer).
I tried to do my best to test and handle most of the cases. I added a keyword
[...]which can be useful to truncate very long lines.Thanks