Skip to content

Commit

Permalink
Create JPQL and HQL parsers.
Browse files Browse the repository at this point in the history
Introduce grammars that support both JPQL (JPA 3.1) as well as HQL (Hibernate 6.1) and allow us to leverage it for query handling.

Related: #2814.
  • Loading branch information
gregturn committed Mar 2, 2023
1 parent dff47e6 commit 2cc3874
Show file tree
Hide file tree
Showing 38 changed files with 12,870 additions and 113 deletions.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<source.level>16</source.level>
<!-- AspectJ maven plugin can't handle 17 yet -->

<antlr>4.11.1</antlr>
<eclipselink>3.0.3</eclipselink>
<hibernate>6.1.4.Final</hibernate>
<hsqldb>2.7.1</hsqldb>
Expand Down
49 changes: 47 additions & 2 deletions spring-data-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@
</exclusions>
</dependency>

<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>${antlr}</version>
</dependency>

<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
Expand Down Expand Up @@ -247,8 +253,8 @@
<plugins>

<!--
Jacoco plugin redeclared to make sure it's downloaded and
the agents can be explicitly added to the test executions.
Jacoco plugin redeclared to make sure it's downloaded and
the agents can be explicitly added to the test executions.
-->
<plugin>
<groupId>org.jacoco</groupId>
Expand Down Expand Up @@ -344,6 +350,45 @@
</executions>
</plugin>

<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
<version>${antlr}</version>
<executions>
<execution>
<goals>
<goal>antlr4</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<visitor>true</visitor>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>maven-replacer-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<phase>process-sources</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
<include>target/generated-sources/antlr4/**/*.java</include>
</includes>
<variableTokenValueMap>
public class=class,public interface=interface
</variableTokenValueMap>
</configuration>
</plugin>

<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
Expand Down
Loading

0 comments on commit 2cc3874

Please sign in to comment.