Commit Graph

2428 Commits

Author SHA1 Message Date
Jan-Willem Gmelig Meyling
ff3d0c8a17 Fix various issues caused by invalid constant assumptions
Reverts #2354
Fixes #2326
Fixes #2816
Fixes #1413
Fixes #1429
Closes #2000
2021-06-08 16:34:06 +02:00
Jan-Willem Gmelig Meyling
8923195795
Merge pull request #2895 from F43nd1r/avoid-varargs-array-creation
Add one-arg overloads for coalesce
2021-06-07 22:30:11 +02:00
f43nd1r
472f20a883 Revert "Type generic in coalesce methods"
This reverts commit 78fe927f
2021-06-07 17:36:53 +02:00
f43nd1r
e825fa7258 add one-arg overloads for coalesce 2021-06-07 15:29:48 +02:00
Jan-Willem Gmelig Meyling
f2dba6e731 Bump org.jetbrains:annotations dependency 2021-06-03 17:58:27 +02:00
dependabot[bot]
fd49f991af
Bump javax.annotation-api from 1.3.1 to 1.3.2
Bumps [javax.annotation-api](https://github.com/javaee/javax.annotation) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/javaee/javax.annotation/releases)
- [Commits](https://github.com/javaee/javax.annotation/compare/1.3.1...1.3.2)

---
updated-dependencies:
- dependency-name: javax.annotation:javax.annotation-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-03 06:42:44 +00:00
Jan-Willem Gmelig Meyling
dd8c587e60
Merge pull request #2857 from querydsl/fix-classgraph-scope
Fix classgraph scope
2021-06-03 00:14:24 +02:00
Jan-Willem Gmelig Meyling
468c299be5
Merge pull request #2737 from querydsl/typed-nullif
Type nullif and coalesce in expression hierarchy
2021-06-02 23:51:24 +02:00
Jan-Willem Gmelig Meyling
e9589bbec8 Fix classgraph scope 2021-06-02 23:28:16 +02:00
Jan-Willem Gmelig Meyling
78fe927fcf Type generic in coalesce methods 2021-06-02 20:33:55 +02:00
f43nd1r
f2710b1cf1 Merge branch 'master' into checkstyle
# Conflicts:
#	pom.xml
#	querydsl-codegen-utils/src/main/java/com/querydsl/codegen/utils/SimpleCompiler.java
#	querydsl-core/src/main/java/com/querydsl/core/group/GAvg.java
#	src/main/resources/querydsl_checks_base.xml
2021-06-02 11:08:54 +02:00
Jan-Willem Gmelig Meyling
335f11f354
Merge pull request #2803 from MaciejDobrowolski/bugfix/2802-arithmetic-exception-when-using-groupby-avg
#2802 - Fixing ArithmeticException when using GroupBy.avg()
2021-06-02 09:41:40 +02:00
f43nd1r
b669e1d9d7 fix up checkstyle 2021-05-15 03:35:53 +02:00
f43nd1r
9ce575d07e replace outdated reflections library with https://github.com/classgraph/classgraph 2021-05-02 19:42:46 +02:00
Maciej Dobrowolski
82f240a889 2802 - Fixing ArithmeticException when using GroupBy.avg() - GAvg now uses default or user-provided MathContext for calculating the average 2021-04-09 13:56:06 +02:00
Jan-Willem Gmelig Meyling
25e47ce7ab Compile on Java 11 2021-02-24 18:23:23 +01:00
Jan-Willem Gmelig Meyling
725acde46e Compile under Java 11 2021-02-24 16:20:46 +01:00
Jan-Willem Gmelig Meyling
a4264c3d1d Add typed version of coalesce 2021-01-26 12:44:23 +01:00
Jan-Willem Gmelig Meyling
dfd0efdeeb Override in all subtypes 2021-01-26 12:18:01 +01:00
Jan-Willem Gmelig Meyling
3ed6c822bb Type nullif in ComparableExpression and StringExpression 2021-01-25 23:05:25 +01:00
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