Skip to content

Parse SQL queries correctly#17

Merged
christianhelle merged 4 commits into
christianhelle:masterfrom
diotteo:sql_parser
Apr 26, 2021
Merged

Parse SQL queries correctly#17
christianhelle merged 4 commits into
christianhelle:masterfrom
diotteo:sql_parser

Conversation

@diotteo

@diotteo diotteo commented Apr 24, 2021

Copy link
Copy Markdown
Contributor

The last version of the software parses the input in the Query window by splitting the string on semicolons and then decides whether to display its output based on whether the resulting substring starts with "select".

This creates issues with comments. For example, this is the output of the software at the moment:
image

In this branch, I integrate the Antlr4 parser so that comments are parsed away correctly. This permits using comments:
image

This functionality is most useful when doing quick-and-dirty updates. Example:
image

diotteo added 4 commits April 5, 2021 18:20
The grammars are taken from the antlr-grammars project
but modified slightly (file and grammar names are renamed from x to xCore)
@christianhelle christianhelle self-assigned this Apr 25, 2021
@christianhelle

Copy link
Copy Markdown
Owner

Hi @diotteo

This looks great! Thanks for the contribution!

@christianhelle christianhelle merged commit dfabc76 into christianhelle:master Apr 26, 2021
@christianhelle

Copy link
Copy Markdown
Owner

@diotteo I'll prepare a release with your contribution soon

@christianhelle

Copy link
Copy Markdown
Owner

These changes are now included in the latest release. Thanks again for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants