Skip to content

Commit 1e61454

Browse files
committed
feat: version bump to 2.2.0
1 parent 53b071e commit 1e61454

File tree

7 files changed

+27
-21
lines changed

7 files changed

+27
-21
lines changed

eaphone-spring-data-query-commons/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.eaphonetech</groupId>
66
<artifactId>eaphone-spring-data-query-parent</artifactId>
7-
<version>2.1.1</version>
7+
<version>2.2.0</version>
88
</parent>
99

1010
<artifactId>eaphone-spring-data-query-commons</artifactId>

eaphone-spring-data-query-jpa/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.eaphonetech</groupId>
66
<artifactId>eaphone-spring-data-query-parent</artifactId>
7-
<version>2.1.1</version>
7+
<version>2.2.0</version>
88
</parent>
99

1010
<artifactId>eaphone-spring-data-query-jpa</artifactId>

eaphone-spring-data-query-jpa/src/main/java/com/eaphonetech/common/datatables/jpa/columns/AbstractColumnTypeDecorator.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,17 +216,23 @@ public void fillPredicates(List<Predicate> predicates, CriteriaBuilder crit, Exp
216216
// TODO Need test here about regular expressions
217217
// src:
218218
// https://stackoverflow.com/questions/24995881/use-regular-expressions-in-jpa-criteriabuilder
219-
predicates.add(//
220-
crit.equal(//
221-
crit.function("regexp", Integer.class, exp, crit.literal(filter.get_regex()))//
222-
, 1));
219+
Expression<String> patternLiteral = crit.literal(filter.get_regex());
220+
221+
// 尝试直接使用函数返回的布尔值作为谓词
222+
try {
223+
predicates.add( //
224+
crit.isTrue( //
225+
crit.function("regexp", Boolean.class, exp, patternLiteral)
226+
//
227+
));
228+
} catch (IllegalArgumentException e) {
229+
System.err.println("Failed to create regexp predicate with function: " + e.getMessage());
230+
}
223231
}
224232
if (StringUtils.hasLength(filter.get_like())) {
225-
// TODO Need test here about whether '%' should be added
226233
predicates.add(crit.like(exp, filter.get_like()));
227234
}
228235
if (StringUtils.hasLength(filter.get_notlike())) {
229-
// TODO Need test here about whether '%' should be added
230236
predicates.add(crit.like(exp, filter.get_notlike()).not());
231237
}
232238
if (filter.get_empty() != null) {

eaphone-spring-data-query-mongodb/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.eaphonetech</groupId>
66
<artifactId>eaphone-spring-data-query-parent</artifactId>
7-
<version>2.1.1</version>
7+
<version>2.2.0</version>
88
</parent>
99

1010
<artifactId>eaphone-spring-data-query-mongodb</artifactId>

eaphone-spring-data-query-samples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.eaphonetech</groupId>
66
<artifactId>eaphone-spring-data-query-parent</artifactId>
7-
<version>2.1.1</version>
7+
<version>2.2.0</version>
88
</parent>
99

1010
<artifactId>eaphone-spring-data-query-samples</artifactId>

eaphone-spring-data-query-samples/src/main/resources/static/js/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,12 @@ $(document).ready(function() {
144144
}]
145145
}
146146
}, {
147-
summary: 'Like',
148-
description: 'SQL like',
147+
summary: 'Not Like',
148+
description: 'SQL NOT like',
149149
value: {
150150
where: {
151151
"orderNumber": {
152-
"_like": "O100%"
152+
"_notlike": "O100%"
153153
}
154154
}
155155
}

pom.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
<parent>
55
<groupId>org.springframework.boot</groupId>
66
<artifactId>spring-boot-starter-parent</artifactId>
7-
<version>3.0.13</version>
7+
<version>3.5.5</version>
88
</parent>
99

1010
<groupId>com.eaphonetech</groupId>
1111
<artifactId>eaphone-spring-data-query-parent</artifactId>
12-
<version>2.1.1</version>
12+
<version>2.2.0</version>
1313
<packaging>pom</packaging>
1414

1515
<organization>
@@ -18,10 +18,10 @@
1818
</organization>
1919

2020
<scm>
21-
<connection>scm:git:https://e.coding.net/biggates/java-projects/eaphone-spring-data-query.git</connection>
22-
<developerConnection>scm:git:https://e.coding.net/biggates/java-projects/eaphone-spring-data-query.git</developerConnection>
23-
<url>https://e.coding.net/biggates/java-projects/eaphone-spring-data-query.git</url>
24-
<tag>2.1.1</tag>
21+
<connection>scm:git:https://github.com/EaphoneTech/eaphone-spring-data-query.git</connection>
22+
<developerConnection>scm:git:https://github.com/EaphoneTech/eaphone-spring-data-query.git</developerConnection>
23+
<url>https://github.com/EaphoneTech/eaphone-spring-data-query</url>
24+
<tag>2.2.0</tag>
2525
</scm>
2626

2727
<properties>
@@ -61,7 +61,7 @@
6161
<dependency>
6262
<groupId>de.bwaldvogel</groupId>
6363
<artifactId>mongo-java-server</artifactId>
64-
<version>1.45.0</version>
64+
<version>1.47.0</version>
6565
</dependency>
6666

6767
<!-- h2 for fake mysql -->
@@ -94,7 +94,7 @@
9494
<plugin>
9595
<groupId>org.apache.maven.plugins</groupId>
9696
<artifactId>maven-javadoc-plugin</artifactId>
97-
<version>3.10.0</version>
97+
<version>3.11.3</version>
9898
</plugin>
9999
<plugin>
100100
<groupId>org.apache.maven.plugins</groupId>

0 commit comments

Comments
 (0)