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

Check if the query parser could be replaced by the JOOQ or JSqlParser #188

Closed
bchapuis opened this issue Feb 26, 2021 · 6 comments · Fixed by #280
Closed

Check if the query parser could be replaced by the JOOQ or JSqlParser #188

bchapuis opened this issue Feb 26, 2021 · 6 comments · Fixed by #280
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request question Further information is requested

Comments

@bchapuis
Copy link
Member

https://www.jooq.org/doc/latest/manual/sql-building/sql-parser/

https://www.jooq.org/doc/latest/manual/sql-building/dsl-context/custom-settings/settings-parser/

Set Settings.parseUnknownFunctions to IGNORE

@bchapuis bchapuis changed the title Investigate the use of the JOOQ parser to replace Check if the query parser could be replaced by the JOOQ parser Feb 26, 2021
@bchapuis bchapuis added dependencies Pull requests that update a dependency file enhancement New feature or request question Further information is requested labels Apr 10, 2021
@ebocher
Copy link

ebocher commented Jun 16, 2021

Hi @bchapuis ,
Let's share with you this excellent SQL parser : https://github.com/JSQLParser/JSqlParser
Cheers

@bchapuis
Copy link
Member Author

bchapuis commented Jun 16, 2021

@ebocher Thanks a lot for the pointer and the interesting discussion, this is definitely a solid candidate to replace my poorman's parser, especially if the Postgresql syntax is well supported.

@bchapuis bchapuis changed the title Check if the query parser could be replaced by the JOOQ parser Check if the query parser could be replaced by the JOOQ or JSqlParser Jun 16, 2021
@ebocher
Copy link

ebocher commented Jun 16, 2021

It will be a pleasure to share experience, feedback and go ahead with you and the Suisse team ;-)

@bchapuis bchapuis linked a pull request Jun 24, 2021 that will close this issue
@bchapuis
Copy link
Member Author

bchapuis commented Jun 24, 2021

@ebocher I just gave a try to the parser and one of my use cases involves a feature which will be released in 4.1. Basically, it is not yet possible to parse this kind of queries with JSQLParser.

"SELECT id, hstore(array['tag1', 'tag2'], array[tag1, tag2]), geom FROM table"

But so far, the experience with this library is pretty good and it may help at optimizing the queries further.

@ebocher
Copy link

ebocher commented Jun 25, 2021

Nice and it seems there is a release in the pipe JSQLParser/JSqlParser#1231

@bchapuis
Copy link
Member Author

Yes, that's great, I just have to be patient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants