Skip to content

Use EclipseLink JPQLParser to parse JPQL queries #2458

Closed
@DiegoKrupitza

Description

@DiegoKrupitza

I have seen that there are few issues open, that are related to JPQL queries not parsed correctly.

Since EclipseLink is already present in the project it does not bring in a new dependency.
JPQLParser is located in org.eclipse.persistence.internal.jpa.parsing.jpql.

Why use JQPLParser over the current approach? The current approach uses REGEX and String formatting magic that can be quite hard. A REGEX expression is quite limited and has less power than a full parser that utilizes the power of context free grammars. Using only REGEX is not a good idea since JPQL is not a regular language. Therefore JPQL cannot be represented only using REGEX. (see more here and here why REGEX is not powerful enough).

Metadata

Metadata

Assignees

Labels

in: query-parserEverything related to parsing JPQL or SQLstatus: supersededAn issue that has been superseded by another

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions