Commit Graph

2408 Commits

Author SHA1 Message Date
Jan-Willem Gmelig Meyling
d651911bd5
Java 9 Automatic Module Names (#2727) 2021-01-24 20:50:27 +01:00
Jan-Willem Gmelig Meyling
1c7def015b [#2366] Expose min/max on ComparableExpressoin(Base) 2021-01-24 16:39:46 +01:00
rob-valor
b7009c4529 [#2460] Allow alternative Generated annotation to be provided
Fixes #2460
Fixes #2612
Fixes #2242
Closes #2657

Co-authored-by: Jan-Willem Gmelig Meyling <jan-willem@youngmediaexperts.nl>
2021-01-18 10:19:07 +01:00
Jan-Willem Gmelig Meyling
ac7f855dda ResultTransformers for Guava collections
This pull request implements `ResultTransformers` for [Guava collection types](https://github.com/google/guava/wiki/CollectionUtilitiesExplained) (`Multimap`, `Table`, `BiMap`). The [`ResultTransformers`](http://www.querydsl.com/static/querydsl/latest/reference/html/ch03s02.html) form a fantastic API to project tuples to a composition of collections, most notably `Map` and `List`. However, deep nested `Maps` of `Lists` or `Maps` of  `Maps` can lead to superfluous and erroneous code. The Guava collection types help with this, for example: `Multimap` forms a fluent API around a `Map<K, Set<V>` and `Table<R, C, V>` is basically a two-dimensional `Map`. This pull request adds factory methods in `GuavaGroupBy` to construct `ResultTransformers` for these Guava collection types.
2021-01-03 17:54:35 +01:00
Jan-Willem Gmelig Meyling
78cd6ae97b
Merge pull request #2563 from jwgmeligmeyling/comparable-expression-inconsistency
Fix inconsistency between final and non-final methods in ComparableExpression, ComparableExpressionBase and SimpleExpression
2021-01-01 18:52:04 +01:00
Jan-Willem Gmelig Meyling
33dd19c855 [#2666] Clearer exception for using unsupported SQL Expressions in JPQL 2021-01-01 16:02:56 +01:00
Jan-Willem Gmelig Meyling
d9135b228a
Merge pull request #2605 from jwgmeligmeyling/issue/2053
[#2504] [#2053] Fix fetchResults for GROUP BY and HAVING in JPQL
2021-01-01 13:24:24 +01:00
Jan-Willem Gmelig Meyling
85c8e89934
Merge pull request #2707 from querydsl/i1941
Remove dots from MDC log fields.
2021-01-01 13:23:00 +01:00
Wyko Rijnsburger
2362416d26 Remove dots from MDC log fields. 2020-12-31 19:46:16 +01:00
Jan-Willem Gmelig Meyling
c75ef4cafd
Merge pull request #2530 from jwgmeligmeyling/jpa-treated-path
[#658] Support JPQL Treated paths for WHERE clause
2020-12-31 19:45:05 +01:00
Jan-Willem Gmelig Meyling
942812f7a3
Merge pull request #2706 from querydsl/memory-leak-template-cache
[#2218] Store cached templates weakly
2020-12-31 19:43:42 +01:00
Jan-Willem Gmelig Meyling
60e2f3a901 [#658] Support JPQL Treated paths for WHERE clause
JPA 2.1 introduced the TREAT operator for explicit casting. Initial support for TREAT in the FROM clause was added in PR #705. However, the specification also describes the notion of `treated_subpath` expressions (chapter 4.4.4.1) that are allowed in the WHERE clause of a query.

The syntax is as follows:

> ```
> treated_subpath ::= TREAT(general_subpath AS subtype)
>
> single_valued_path_expression ::= qualified_identification_variable | TREAT(qualified_identification_variable AS subtype) | state_field_path_expression | single_valued_object_path_expression
> ```

And can be used as such:

```SQL
SELECT e FROM Employee e JOIN e.projects p WHERE TREAT(p AS LargeProject).budget > 1000
```

(Example from chapter 4.4.9).

This pull request adds the support for treated subpaths in QueryDSL. It does so by introducing a new `PathType` and convenience method `JPAExpressions.treat`.
2020-12-31 17:59:34 +01:00
Jan-Willem Gmelig Meyling
261612a37b Fix inconsistency between final and non-final methods in ComparableExpression, ComparableExpressionBase and SimpleExpression 2020-12-31 17:57:32 +01:00
Jan-Willem Gmelig Meyling
6d612d9435 [#2504] [#2053] Fix fetchResults for GROUP BY and HAVING in JPQL" 2020-12-31 17:56:06 +01:00
Jan-Willem Gmelig Meyling
0fb26e84c8 [#2479] Migrate off of JSR305 2020-12-31 17:52:35 +01:00
Jan-Willem Gmelig Meyling
f62c06cac4 [#2218] Store cached templates weakly
Fixes #2218
2020-12-31 17:18:44 +01:00
Jan-Willem Gmelig Meyling
110c3be7da Remove Guava as dependency 2020-12-28 18:22:29 +01:00
Jan-Willem Gmelig Meyling
1c7f72e901 Merge branch 'issue/2671' into java-8-2 2020-12-28 16:06:53 +01:00
Jan-Willem Gmelig Meyling
f20697e9a1 [#2671] Make Alias.* thread-safe 2020-12-28 15:16:43 +01:00
Jan-Willem Gmelig Meyling
ac878c7f10 Removed Guava use in CollectionUtils 2020-12-25 18:01:37 +01:00
Jan-Willem Gmelig Meyling
138f61363d Removed Guava's Primitive usage 2020-12-25 17:52:22 +01:00
Jan-Willem Gmelig Meyling
7f9849e86d Removed Guava Collection occurrences 2020-12-23 23:38:21 +01:00
Jan-Willem Gmelig Meyling
5ffbc0a0cc Implemented unmodifiable collection utils 2020-11-15 20:46:21 +01:00
Jan-Willem Gmelig Meyling
f1be28ab37 Replace Guava Stopwatch for benchmarks 2020-11-15 20:46:21 +01:00
Jan-Willem Gmelig Meyling
73e8305049 Eliminate more Guava API's 2020-11-15 20:46:10 +01:00
Jan-Willem Gmelig Meyling
33ea95a912 Replace Guava Iterables 2020-11-01 00:01:30 +01:00
Jan-Willem Gmelig Meyling
a6b5d0ad6b Replace Guava Function 2020-10-31 23:36:32 +01:00
Jan-Willem Gmelig Meyling
36f1299abc Replace Guava API's with Java 8 ones 2020-10-31 23:35:47 +01:00
Jan-Willem Gmelig Meyling
5abd478fc3 Add Fetchable#stream method 2020-10-27 16:07:26 +01:00
Jan-Willem Gmelig Meyling
9f859baccc Java 6/7/8 performance upgrades and migrations 2020-10-26 22:59:40 +01:00
Jan-Willem Gmelig Meyling
dfc50ac0d9 Target Java 8 for compilation 2020-10-26 19:49:27 +01:00
John Tims
08bea1ab3c Querydsl 5.0.0-SNAPSHOT 2020-10-23 21:25:43 -06:00
John Tims
182de7fe5d Querydsl 4.4.1-SNAPSHOT 2020-09-19 08:58:27 -06:00
John Tims
a3efb0e7e5 Querydsl 4.4.0 2020-09-19 08:08:10 -06:00
Petr Kotek
ffd1e729cb Expressions: fix equals method - e.g. Expressions.asString("foo").equals(Expressions.asString("foo")) should return true
also add test coverage
2020-07-28 21:50:20 +02:00
John Tims
ea3efae5d5 Querydsl 4.4.0-SNAPSHOT 2020-06-03 06:45:31 -06:00
John Tims
c038ffcded Merge branch 'null-expression' of git://github.com/Danepic/querydsl into Danepic-null-expression 2020-05-28 08:06:30 -06:00
John Tims
c0cf15d1b1
Merge pull request #2373 from yorlov/master
Replace 'while' and 'for' loop to 'foreach'
2020-05-27 06:52:08 -06:00
John Tims
aee2f56adb Querydsl 4.3.2-SNAPSHOT 2020-03-26 16:12:09 -06:00
John Tims
d514fd024f Querydsl 4.3.1 2020-03-26 12:54:48 -06:00
John Tims
a8b2f49535 Bump version to 4.3.1-SNAPSHOT 2020-03-15 17:55:55 -06:00
John Tims
043a871638 Querydsl 4.3.0 2020-03-13 12:08:27 -06:00
Ido Salomon
c1dc00ca66 Revert "issue-2303: Consider optimising AbstractSQL::newInstance (becomes a bottleneck for small queries)"
This reverts commit 1b2af5510d.
2020-03-02 23:28:19 +02:00
Rajesh Balamohan
1b2af5510d issue-2303: Consider optimising AbstractSQL::newInstance (becomes a bottleneck for small queries) 2020-03-02 18:42:27 +02:00
Pavel Polívka
383236b3c9
Hibernate 5 3 fix proper solution (#2354)
* Fix: Hibernate compatibility issues (up to at least 5.4)
2020-02-29 17:31:53 +02:00
Danilo
c90bd88b54 Support Character.class in EnumConversion 2020-02-08 17:24:38 +02:00
John Tims
a221cd4d34 Querydsl 4.2.3-SNAPSHOT 2019-11-24 09:45:17 -07:00
John Tims
f2107a8242 Querydsl 4.2.2 2019-11-23 12:20:24 +02:00
Unknown
455a0e2e00 NullExpression with type 2019-02-08 03:36:21 -02:00
Yuri Orlov
97bfe08d68
Replace 'while' and 'for' loop to 'foreach' 2018-10-27 17:43:33 +03:00