Skip to content

Commit 814887f

Browse files
committed
Create JPQL and HQL parsers.
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.
1 parent dff47e6 commit 814887f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+13047
-135
lines changed

Diff for: pom.xml

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<source.level>16</source.level>
3131
<!-- AspectJ maven plugin can't handle 17 yet -->
3232

33+
<antlr>4.11.1</antlr>
3334
<eclipselink>3.0.3</eclipselink>
3435
<hibernate>6.1.4.Final</hibernate>
3536
<hsqldb>2.7.1</hsqldb>

Diff for: spring-data-jpa/pom.xml

+47-2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@
7373
</exclusions>
7474
</dependency>
7575

76+
<dependency>
77+
<groupId>org.antlr</groupId>
78+
<artifactId>antlr4-runtime</artifactId>
79+
<version>${antlr}</version>
80+
</dependency>
81+
7682
<dependency>
7783
<groupId>org.aspectj</groupId>
7884
<artifactId>aspectjweaver</artifactId>
@@ -247,8 +253,8 @@
247253
<plugins>
248254

249255
<!--
250-
Jacoco plugin redeclared to make sure it's downloaded and
251-
the agents can be explicitly added to the test executions.
256+
Jacoco plugin redeclared to make sure it's downloaded and
257+
the agents can be explicitly added to the test executions.
252258
-->
253259
<plugin>
254260
<groupId>org.jacoco</groupId>
@@ -344,6 +350,45 @@
344350
</executions>
345351
</plugin>
346352

353+
<plugin>
354+
<groupId>org.antlr</groupId>
355+
<artifactId>antlr4-maven-plugin</artifactId>
356+
<version>${antlr}</version>
357+
<executions>
358+
<execution>
359+
<goals>
360+
<goal>antlr4</goal>
361+
</goals>
362+
<phase>generate-sources</phase>
363+
<configuration>
364+
<visitor>true</visitor>
365+
</configuration>
366+
</execution>
367+
</executions>
368+
</plugin>
369+
370+
<plugin>
371+
<groupId>com.google.code.maven-replacer-plugin</groupId>
372+
<artifactId>maven-replacer-plugin</artifactId>
373+
<version>1.4.1</version>
374+
<executions>
375+
<execution>
376+
<phase>process-sources</phase>
377+
<goals>
378+
<goal>replace</goal>
379+
</goals>
380+
</execution>
381+
</executions>
382+
<configuration>
383+
<includes>
384+
<include>target/generated-sources/antlr4/**/*.java</include>
385+
</includes>
386+
<variableTokenValueMap>
387+
public class=class,public interface=interface
388+
</variableTokenValueMap>
389+
</configuration>
390+
</plugin>
391+
347392
<plugin>
348393
<artifactId>maven-compiler-plugin</artifactId>
349394
<executions>

0 commit comments

Comments
 (0)