Skip to content

Commit

Permalink
Removing obsolete code, ancient modules and dropped features
Browse files Browse the repository at this point in the history
  • Loading branch information
velo committed Jul 9, 2024
1 parent a82d311 commit d72f502
Show file tree
Hide file tree
Showing 141 changed files with 180 additions and 12,041 deletions.
5 changes: 4 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-root</artifactId>
<version>6.6-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>

<packaging>pom</packaging>
<name>Querydsl</name>
Expand Down Expand Up @@ -87,6 +87,9 @@
</distributionManagement>

<properties>
<!-- removing old modules on 7.0 release -->
<japicmp.skip>true</japicmp.skip>

<failIfNoTests>false</failIfNoTests>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.homepage>http://www.querydsl.com</project.homepage>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-root</artifactId>
<version>6.6-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-docs</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-root</artifactId>
<version>6.6-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-examples</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-jpa-guice/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.6-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-example-jpa-guice</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-jpa-quarkus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.6-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-example-jpa-quarkus</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-jpa-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.6-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-example-jpa-spring</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-kotlin-codegen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.6-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>
<artifactId>querydsl-example-kotlin-codegen</artifactId>
<name>Querydsl example - Kotlin Codegen</name>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-kotlin-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.6-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>
<artifactId>querydsl-example-kotlin</artifactId>
<name>Querydsl example - Kotlin JPA</name>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-kotlin-mongodb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.6-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>
<artifactId>querydsl-example-kotlin-mongodb</artifactId>
<name>Querydsl example - Kotlin MongoDB</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.6-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-example-r2dbc-sql-codegen</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-sql-guice/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.6-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-example-sql-guice</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-sql-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.6-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-example-sql-spring</artifactId>
Expand Down
7 changes: 4 additions & 3 deletions querydsl-libraries/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-root</artifactId>
<version>6.6-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-libraries</artifactId>
Expand Down Expand Up @@ -97,8 +97,6 @@
<exclude>org.hibernate:hibernate-envers:*:*:compile</exclude>
<exclude>org.hibernate.validator:hibernate-validator:*:*:compile</exclude>
<exclude>org.eclipse.persistence:eclipselink:*:*:compile</exclude>
<exclude>org.datanucleus:javax.jdo:*:*:compile</exclude>
<exclude>org.springframework.roo:org.springframework.roo.annotations:*:*:compile</exclude>
<exclude>org.mongodb.morphia:morphia:*:*:compile</exclude>
<exclude>org.joda:joda-money:*:*:compile</exclude>
<exclude>org.batoo.jpa:batoo-jpa:*:*:compile</exclude>
Expand All @@ -111,6 +109,9 @@
<exclude>jakarta.xml.bind:jakarta.xml.bind-api:*:*:compile</exclude>
<!-- Ban any API's that were moved to jakarta -->
<exclude>javax.*:*:*:*:*</exclude>
<!-- Ban libraries that support was dropped -->
<exclude>org.datanucleus:javax.jdo:*:*:*</exclude>
<exclude>org.springframework.roo:org.springframework.roo.annotations:*:*:compile</exclude>
<!-- The following database drivers should be in test scope -->
<exclude>org.hsqldb:hsqldb:*:*:compile</exclude>
<exclude>com.h2database:h2:*:*:compile</exclude>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-libraries/querydsl-collections/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-libraries</artifactId>
<version>6.6-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<groupId>io.github.openfeign.querydsl</groupId>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-libraries/querydsl-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-libraries</artifactId>
<version>6.6-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ public Collection<Predicate> string(
rv.add(expr.notBetween("A", "Z"));
rv.add(expr.notBetween(other, other));

if (!target.equals(Target.DERBY) && !module.equals(QuerydslModule.JDO)) {
if (!target.equals(Target.DERBY)) {
// https://issues.apache.org/jira/browse/DERBY-4389
rv.add(new Coalesce<String>(String.class, expr, other).getValue().eq("xxx"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,23 @@
*/
package com.querydsl.core;

import com.querydsl.core.types.*;
import com.querydsl.core.types.dsl.*;
import com.querydsl.core.types.CollectionExpression;
import com.querydsl.core.types.Constant;
import com.querydsl.core.types.Expression;
import com.querydsl.core.types.MapExpression;
import com.querydsl.core.types.Predicate;
import com.querydsl.core.types.dsl.ArrayExpression;
import com.querydsl.core.types.dsl.CollectionExpressionBase;
import com.querydsl.core.types.dsl.ComparableExpression;
import com.querydsl.core.types.dsl.DateExpression;
import com.querydsl.core.types.dsl.DateTimeExpression;
import com.querydsl.core.types.dsl.ListExpression;
import com.querydsl.core.types.dsl.ListPath;
import com.querydsl.core.types.dsl.MapExpressionBase;
import com.querydsl.core.types.dsl.NumberExpression;
import com.querydsl.core.types.dsl.SimpleExpression;
import com.querydsl.core.types.dsl.StringExpression;
import com.querydsl.core.types.dsl.TimeExpression;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
Expand Down Expand Up @@ -78,7 +93,6 @@ public Collection<Predicate> date(
rv.add(expr.dayOfMonth().eq(other.dayOfMonth()));

if (!target.equals(Target.DERBY)
&& !module.equals(QuerydslModule.JDO)
&& !target.equals(Target.ORACLE)
&& !target.equals(Target.FIREBIRD)
&& (!target.equals(Target.POSTGRESQL) || !module.equals(QuerydslModule.JPA))) {
Expand Down Expand Up @@ -120,7 +134,6 @@ public Collection<Predicate> dateTime(
rv.add(expr.dayOfMonth().eq(other.dayOfMonth()));

if (!target.equals(Target.DERBY)
&& !module.equals(QuerydslModule.JDO)
&& !target.equals(Target.ORACLE)
&& (!target.equals(Target.POSTGRESQL) || !module.equals(QuerydslModule.JPA))) {
rv.add(expr.dayOfWeek().eq(other.dayOfWeek()));
Expand Down Expand Up @@ -198,12 +211,10 @@ public <A extends Number & Comparable<A>> Collection<Predicate> numeric(

public Collection<Predicate> string(StringExpression expr, StringExpression other) {
HashSet<Predicate> rv = new HashSet<Predicate>();
if (module != QuerydslModule.LUCENE) {
rv.addAll(comparable(expr, other));
rv.addAll(comparable(expr, other));

rv.add(expr.charAt(0).eq(other.charAt(0)));
rv.add(expr.charAt(1).eq(other.charAt(1)));
}
rv.add(expr.charAt(0).eq(other.charAt(0)));
rv.add(expr.charAt(1).eq(other.charAt(1)));

rv.add(expr.contains(other));
rv.add(expr.contains(other.substring(0, 1)));
Expand Down Expand Up @@ -232,58 +243,50 @@ public Collection<Predicate> string(StringExpression expr, StringExpression othe
rv.add(expr.eq(other));
rv.add(expr.equalsIgnoreCase(other));

if (module != QuerydslModule.LUCENE) {
rv.add(expr.indexOf(other).eq(0));
rv.add(expr.locate(other).eq(1));
}
rv.add(expr.indexOf(other).eq(0));
rv.add(expr.locate(other).eq(1));

if (target != Target.DERBY && module != QuerydslModule.LUCENE) {
if (target != Target.DERBY) {
rv.add(expr.indexOf(other.substring(1)).eq(1));
rv.add(expr.indexOf(other.substring(2)).eq(2));
}

if (module != QuerydslModule.LUCENE) {
rv.add(expr.isEmpty().not());
rv.add(expr.isNotEmpty());
}
rv.add(expr.isEmpty().not());
rv.add(expr.isNotEmpty());

if (module != QuerydslModule.LUCENE) {
rv.add(expr.length().eq(other.length()));
rv.add(expr.like(other));
rv.add(expr.length().eq(other.length()));
rv.add(expr.like(other));

if (module != QuerydslModule.JDO || other instanceof Constant<?>) {
rv.add(expr.like(other.substring(0, 1).append("%")));
rv.add(expr.like(other.substring(0, 1).append("%").append(other.substring(2))));
rv.add(expr.like(other.substring(1).prepend("%")));
rv.add(expr.like(other.substring(1, 2).append("%").prepend("%")));
}
if (other instanceof Constant<?>) {
rv.add(expr.like(other.substring(0, 1).append("%")));
rv.add(expr.like(other.substring(0, 1).append("%").append(other.substring(2))));
rv.add(expr.like(other.substring(1).prepend("%")));
rv.add(expr.like(other.substring(1, 2).append("%").prepend("%")));
}

rv.add(expr.lower().eq(other.lower()));

if (module != QuerydslModule.LUCENE) {
if (!module.equals(QuerydslModule.SQL)
|| (!target.equals(Target.HSQLDB)
&& !target.equals(Target.FIREBIRD)
&& !target.equals(Target.H2)
&& !target.equals(Target.DB2)
&& !target.equals(Target.DERBY)
&& !target.equals(Target.SQLITE)
&& !target.equals(Target.SQLSERVER))) {

rv.add(expr.matches(other));

if (module != QuerydslModule.JDO || other instanceof Constant<?>) {
rv.add(expr.matches(other.substring(0, 1).append(".*")));
rv.add(expr.matches(other.substring(0, 1).append(".").append(other.substring(2))));
rv.add(expr.matches(other.substring(1).prepend(".*")));
rv.add(expr.matches(other.substring(1, 2).prepend(".*").append(".*")));
}
if (!module.equals(QuerydslModule.SQL)
|| (!target.equals(Target.HSQLDB)
&& !target.equals(Target.FIREBIRD)
&& !target.equals(Target.H2)
&& !target.equals(Target.DB2)
&& !target.equals(Target.DERBY)
&& !target.equals(Target.SQLITE)
&& !target.equals(Target.SQLSERVER))) {

rv.add(expr.matches(other));

if (other instanceof Constant<?>) {
rv.add(expr.matches(other.substring(0, 1).append(".*")));
rv.add(expr.matches(other.substring(0, 1).append(".").append(other.substring(2))));
rv.add(expr.matches(other.substring(1).prepend(".*")));
rv.add(expr.matches(other.substring(1, 2).prepend(".*").append(".*")));
}

rv.add(expr.ne(other));
}

rv.add(expr.ne(other));

rv.add(expr.startsWith(other));
rv.add(expr.startsWith(other.substring(0, 1)));
rv.add(expr.startsWith(other.substring(0, 2)));
Expand All @@ -292,13 +295,11 @@ public Collection<Predicate> string(StringExpression expr, StringExpression othe
rv.add(expr.startsWithIgnoreCase(other.substring(0, 1)));
rv.add(expr.startsWithIgnoreCase(other.substring(0, 2)));

if (module != QuerydslModule.LUCENE) {
rv.add(expr.substring(0, 1).eq(other.substring(0, 1)));
rv.add(expr.substring(1, 2).eq(other.substring(1, 2)));
rv.add(expr.substring(1).eq(other.substring(1)));
rv.add(expr.substring(0, 1).eq(other.substring(0, 1)));
rv.add(expr.substring(1, 2).eq(other.substring(1, 2)));
rv.add(expr.substring(1).eq(other.substring(1)));

rv.add(expr.trim().eq(other.trim()));
}
rv.add(expr.trim().eq(other.trim()));

rv.add(expr.upper().eq(other.upper()));
return Collections.unmodifiableSet(rv);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,18 @@
import com.querydsl.core.types.Constant;
import com.querydsl.core.types.Expression;
import com.querydsl.core.types.MapExpression;
import com.querydsl.core.types.dsl.*;
import com.querydsl.core.types.dsl.ArrayExpression;
import com.querydsl.core.types.dsl.CaseBuilder;
import com.querydsl.core.types.dsl.CollectionExpressionBase;
import com.querydsl.core.types.dsl.DateExpression;
import com.querydsl.core.types.dsl.DateTimeExpression;
import com.querydsl.core.types.dsl.ListExpression;
import com.querydsl.core.types.dsl.ListPath;
import com.querydsl.core.types.dsl.MapExpressionBase;
import com.querydsl.core.types.dsl.NumberExpression;
import com.querydsl.core.types.dsl.SimpleExpression;
import com.querydsl.core.types.dsl.StringExpression;
import com.querydsl.core.types.dsl.TimeExpression;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
Expand Down Expand Up @@ -143,9 +154,7 @@ private <A extends Number & Comparable<A>> Collection<NumberExpression<?>> numer
rv.add(expr.countDistinct());
}

if (!(other instanceof Constant<?>
|| module == QuerydslModule.JDO
|| module == QuerydslModule.RDFBEAN)) {
if (!(other instanceof Constant<?> || module == QuerydslModule.RDFBEAN)) {
CaseBuilder cases = new CaseBuilder();
rv.add(
NumberConstant.create(1)
Expand Down Expand Up @@ -209,9 +218,7 @@ public Collection<SimpleExpression<String>> stringProjections(
rv.add(expr.substring(1));
rv.add(expr.substring(0, 1));

if (!(other instanceof Constant<?>
|| module == QuerydslModule.JDO
|| module == QuerydslModule.RDFBEAN)) {
if (!(other instanceof Constant<?> || module == QuerydslModule.RDFBEAN)) {
CaseBuilder cases = new CaseBuilder();
rv.add(cases.when(expr.eq("A")).then(other).when(expr.eq("B")).then(expr).otherwise(other));

Expand All @@ -222,9 +229,7 @@ public Collection<SimpleExpression<String>> stringProjections(

rv.add(expr.upper());

if (module != QuerydslModule.JDO) {
rv.add(expr.nullif("xxx"));
}
rv.add(expr.nullif("xxx"));

return Collections.unmodifiableSet(rv);
}
Expand Down
Loading

0 comments on commit d72f502

Please sign in to comment.