You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* experimentation with spring data jdbc
* fixed database in pom.xml for jdbc module
* finished implementation of QuerydslJdbcRepository
* added query type as a generic parameter to QuerydslJdbcRepository
added reflective resolution of parameter
* changed constructor resolution to use spring data jdbc infrastructure
* added javadoc to QuerydslJdbcRepository
* refactoring of jdbc tests
* updated README.md
* updated README.md
* updated README.md
* bumped to 3.0.0-SNAPSHOT
* updated README.md breaking changes section
* renamed CustomNamingStrategy to PascalCaseNamingStrategy
Infobip Spring Data JPA Querydsl provides new functionality that enables the user to leverage the full power of Querydsl API on top of Spring Data repository infrastructure.
7
+
Infobip Spring Data Querydsl provides new functionality that enables the user to leverage the full power of Querydsl API on top of Spring Data repository infrastructure.
8
+
9
+
The project is divided into 2 modules: infobip-spring-data-jdbc-querydsl and infobip-spring-data-jpa-querydsl.
8
10
9
11
## Contents
10
12
11
13
1.[News](#News)
12
-
2.[Features and examples](#FeaturesAndExamples)
13
-
*[Native queries with Querydsl](#NativeQueriesWithQuerydsl)
14
-
*[Projections](#Projections)
15
-
*[Query](#Query)
16
-
*[Update](#Update)
17
-
*[Delete](#Delete)
18
-
*[List instead of Iterable return type](#ListInsteadOfIterableReturnType)
3. Refactor repository interfaces to use `ExtendedQueryDslJpaRepository` instead of `JpaRepository` and `QueryDslPredicateExecutor` (note that ExtendedQueryDslJpaRepository extends and provides the API of both):
35
127
36
-
### 2.0.0
128
+
```java
129
+
// ExtendedQueryDslJpaRepository replaces both JpaRepository and QueryDslPredicateExecutor
## <aname="FeaturesAndExamples"></a> Features and examples:
142
+
###<aname="JPAFeaturesAndExamples"></a> Features and examples:
46
143
47
144
All examples have corresponding tests in the project and can be found [here](https://github.com/infobip/infobip-spring-data-jpa-querydsl/blob/master/src/test/java/com/infobip/spring/data/SqlServerQueryDslJpaRepositoryTest.java).
48
145
49
-
### <aname="NativeQueriesWithQuerydsl"></a> Native queries with Querydsl:
146
+
####<aname="JPANativeQueriesWithQuerydsl"></a> Native queries with Querydsl:
50
147
51
148
Example which uses union clause (unions aren't available in JPA):
52
149
@@ -67,7 +164,7 @@ List<Person> actual = repository.jpaSqlQuery(query -> query
67
164
);
68
165
```
69
166
70
-
### <aname="Projections"></a> Projections
167
+
####<aname="JPAProjections"></a> Projections
71
168
72
169
For examples how to construct projections refer to the official documentation - [section result handling](http://www.querydsl.com/static/querydsl/latest/reference/html_single/#result_handling).
73
170
@@ -87,7 +184,7 @@ List<PersonProjection> actual = repository.query(query -> query
87
184
.fetch());
88
185
```
89
186
90
-
### <aname="Query"></a> Query
187
+
####<aname="JPAQuery"></a> Query
91
188
92
189
Query exposes full API of JPAQuery ([QueryDslPredicateExecutor](https://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data/querydsl/QuerydslPredicateExecutor.html)
93
190
only exposes where clause (Predicate) and order clause (OrderSpecifier)).
@@ -105,7 +202,7 @@ List<Person> actual = repository.query(query -> query
long numberOfAffectedRows = repository.deleteWhere(person.firstName.like("John%"));
121
218
```
122
219
123
-
### <aname="ListInsteadOfIterableReturnType"></a> List instead of Iterable return type
220
+
####<aname="JPAListInsteadOfIterableReturnType"></a> List instead of Iterable return type
124
221
125
222
[QueryDslPredicateExecutor](https://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data/querydsl/QuerydslPredicateExecutor.html)#findAll methods return Iterable which can be cumbersome to use.
126
223
Those methods were overridden and now return a List which is easier to use and is easier to convert to Stream.
127
224
128
-
### <aname="TransactionalSupport"></a> Transactional support
225
+
####<aname="JPATransactionalSupport"></a> Transactional support
129
226
130
227
Query execution is always done inside the repository implementation (loan pattern) in a transaction so transactions don't have to be
131
228
handled manually (like they do if you are manually managing JPAQuery and other Querydsl constructs).
3. Refactor repository interfaces to use `ExtendedQueryDslJpaRepository` instead of `JpaRepository` and `QueryDslPredicateExecutor` (note that ExtendedQueryDslJpaRepository extends and provides the API of both):
195
-
196
-
```java
197
-
// ExtendedQueryDslJpaRepository replaces both JpaRepository and QueryDslPredicateExecutor
0 commit comments