Commit Graph

475 Commits

Author SHA1 Message Date
Mark Paluch
e71c2b9b71 #369 - Polishing.
Remove unused code.
2020-05-22 09:25:08 +02:00
Mark Paluch
02c9a87078 #369 - Fall back to column name in QueryMapper if path expression maps into simple type property.
We now fall back to the column name when resolving a property path expression that maps into a simple-typed property. PropertyPath.from(…) fails internally as it attempts to look up a simple type from the MappingContext and this fails for primitive and simple types.
2020-05-22 09:16:49 +02:00
Mark Paluch
6cf2834a23 #207 - Skip converter registrations for JSR-310 to java.util.Date.
We now prevent converter registrations that enforce a conversion from JSR-310 types to java.util.Date. R2DBC drivers use natively JSR-310 types and some of them don't implement java.util.Date at all.
2020-05-15 11:50:24 +02:00
Mark Paluch
7a1e39517f #357 - Prepare 1.1 GA (Neumann). 2020-05-12 12:27:59 +02:00
Mark Paluch
e3f56b4a1b #357 - Updated changelog. 2020-05-12 12:27:53 +02:00
Mark Paluch
af7dea07ad #329 - Translate driver exceptions in R2dbcTransactionManager. 2020-05-11 16:58:23 +02:00
Mark Paluch
53b84e6a08 #365 - Fix immutable versioned object usage.
We now use the proper object instance when constructing statements for insert/update of versioned entities. Previously, we created a new instance that is associated with the incremented version number but we did not reuse that instance so the version increment remained invisible.
2020-05-11 15:57:51 +02:00
Mark Paluch
6f94ace85a #363 - Polishing.
Fix failing tests.
2020-05-11 15:52:06 +02:00
Jens Schauder
15c64a4ee1 #363 - Polishing.
Added an integration test and tweaked the conversions to make it succeed.
The converter now does not rely on the driver to do the conversion anymore.

Original pull request: #360.
2020-05-11 11:35:30 +02:00
mhyeon-lee
d004bc0dd9 #363 - Count projection support for derived queries.
Original pull request: #360.
2020-05-11 11:27:44 +02:00
Jens Schauder
919d8c663f #364 - Add lock() to Dialect implementation for tests. 2020-05-07 09:39:50 +02:00
Mark Paluch
1ec0d8151c #331 - Prepare 1.1 RC2 (Neumann). 2020-04-28 15:03:33 +02:00
Mark Paluch
9b19f61b98 #331 - Updated changelog. 2020-04-28 15:03:28 +02:00
Jens Schauder
94f94c6ba0 #93 - Polishing.
Formatting.
Added issue to test comments.

Removed the test for presence of the id in case of a potential optimistic locking exception.
A deleted row is also a case of a concurrent modification and therefore should trigger the OptimisticLockingException.

Original pull request: #314.
2020-04-24 10:48:10 +02:00
orange-buffalo
8e6797dd04 #93 - Adding support for optimistic locking based on @Version column.
Original pull request: #314.
2020-04-24 10:47:17 +02:00
Mark Paluch
75e2ba3ede #354 - Polishing.
Add author tags. Reformat code.

Original pull request: #355.
2020-04-23 14:29:39 +02:00
Louis Morgan
bf19cb36a4 #354 - Allow saving an entity with a read-only collection-like property.
Previously a NullPointerException would be thrown.

Original pull request: #355.
2020-04-23 14:29:26 +02:00
Mark Paluch
8c0d01ae8c #344 - Polishing.
Consider projection properties as SELECT projection. Refactor distinct() into marker method without accepting a boolean flag. Make distinct field final. Update tests.

Original pull request: #346.
2020-04-21 15:32:03 +02:00
Mingyuan Wu
dd7c713980 #344 - Add support for support distinct derived query methods.
We now support distinct derived queries that are useful with projections to retrieve distinct results.

interface UserRepository extends Repository<User, Long> {

  Mono<UserProjection> findDistinctByFirstName(String firstName);

}

interface UserProjection {

  String getFirstName();

}

Original pull request: #346.
2020-04-21 15:31:52 +02:00
Mark Paluch
ea464b2d37 #341 - Polishing.
Consider modifying indicators in query execution. Consider absence of Criteria for delete and update queries. Add test.

Reformat code, update documentation.

Original pull request: #345.
2020-04-21 14:38:48 +02:00
Mingyuan Wu
a210a2ea6f #341 - Add support for derived delete query methods.
Original pull request: #345.
2020-04-21 14:38:39 +02:00
Mark Paluch
d901566ed4 #342 - Polishing.
Remove Kotlin extension for Criteria as it should live in Spring Data Relational. Add author tags. Reformat code.
2020-04-21 14:13:15 +02:00
Mingyuan Wu
be00ea84ef #342 - Move off deprecated Criteria and Update. 2020-04-21 14:13:08 +02:00
Mark Paluch
af192fd488 #349 - Polishing.
Update reference documentation about query derivation support.
2020-04-21 14:02:33 +02:00
Mark Paluch
5c921c56a4 #349 - Fix parameter binding for Between queries.
We now bind the correct parameter when issuing Between queries.
2020-04-21 14:02:11 +02:00
Mark Paluch
ee46695cdd #350 - Use Testcontainers constructor with image name.
Create database containers using the constructor accepting the image name to make sure that the exposed port gets registered. A recent change in Testcontainers caused that the port is no longer registered when using the default constructor.
2020-04-20 09:39:28 +02:00
Mark Paluch
f54cc8bc5b #330 - Adapt to Criteria objects in Spring Data Relational. 2020-04-08 09:39:29 +02:00
Mark Paluch
5e1d1b2919 #335 - Consider Pageable in derived queries.
We now consider Pageable arguments in derived queries. Previously only limiting queries (findFirst10) were considered.
2020-04-02 14:20:45 +02:00
m1ngyuan
e7214cfb73 #332 - Fix typos in reference documentation. 2020-04-01 14:06:09 +02:00
Mark Paluch
73f6bbcb74 #333 - Move off deprecated EntityInstantiators. 2020-04-01 14:05:34 +02:00
Mark Paluch
669a91f780 #317 - Prepare 1.1 RC1 (Neumann). 2020-03-31 14:59:20 +02:00
Mark Paluch
382121bb8d #317 - Updated changelog. 2020-03-31 14:59:17 +02:00
Mark Paluch
df7919a98d #318 - Add support for Postgres JSON type.
We now pass-thru Postgres's JSON type that can be used in entities and simple queries.
2020-03-31 12:37:56 +02:00
Mark Paluch
020d46b34f #282 - Add documentation.
Original pull request: #295.
2020-03-27 16:40:56 +01:00
Mark Paluch
4e5bf95504 #282 - Polishing.
Move query derivation infrastructure to Spring Data Relational. Adapt to newly introduced ValueFunction for deferred value mapping. Use query derivation in integration tests.

Tweak javadoc, add since and author tags, reformat code.

Related ticket: https://jira.spring.io/browse/DATAJDBC-514
Original pull request: #295.
2020-03-27 16:40:56 +01:00
Mark Paluch
a9a3919cf1 #330 - Adapt to Criteria objects in Spring Data Relational. 2020-03-27 16:40:56 +01:00
Roman Chigvintsev
dbe935c45a #282 - Add support for query derivation.
We now support query derivation for R2DBC repositories:

interface ReactivePersonRepository extends ReactiveSortingRepository<Person, String> {

  Flux<Person> findByFirstname(String firstname);

  Flux<Person> findByFirstname(Publisher<String> firstname);

  Mono<Person> findByFirstnameAndLastname(String firstname, String lastname);

  Flux<Person> findFirstByLastnameLike(String pattern);
}

Original pull request: #295.
2020-03-27 16:40:08 +01:00
Mark Paluch
6dcd8787c1 #328 - Polishing.
Fix javadoc.
2020-03-26 16:00:43 +01:00
Mark Paluch
81adff3f80 #320 - Update documentation regarding @Transient properties usage in the persistence constructor. 2020-03-19 15:39:22 +01:00
Mark Paluch
048bcb8baa #321 - Polishing.
Add optimizations for void projections.
2020-03-19 10:43:12 +01:00
Mark Paluch
b0348e272a #321 - Bind only bindable query method parameters.
We now only bind parameters to the query that are actually bindable instead of consuming the entire parameter list.
2020-03-19 10:12:45 +01:00
Jens Schauder
edc6d9b042 #289 - Polishing.
Minor formatting.

Original pull request: #308.
2020-03-17 11:34:17 +01:00
Mark Paluch
10ec677c53 #189 - Incorporate review feedback.
Fix nullability annotations. Relax generics at DatabaseClient.StatementFilterSpec.filter(…).

Original pull request: #308.
2020-03-17 11:34:11 +01:00
Jens Schauder
4a5184830d #189 - Polishing.
Refactored DefaultDatabaseClientUnitTests in order to make the relevant differences in setup easier to spot.

Original pull request: #308.
2020-03-17 11:34:05 +01:00
Jens Schauder
6a8ab608e5 #189 - Polishing.
Made assertions in tests more strict.

Original pull request: #308.
2020-03-17 11:33:59 +01:00
Mark Paluch
366c10be40 #189 - Accept StatementFilterFunction in DatabaseClient.
We now accept StatementFilterFunction and ExecuteFunction via DatabaseClient to filter Statement execution. StatementFilterFunctions can be used to pre-process the statement or post-process Result objects.

databaseClient.execute(…)
		.filter((s, next) -> next.execute(s.returnGeneratedValues("my_id")))
		.filter((s, next) -> next.execute(s.fetchSize(25)))

databaseClient.execute(…)
		.filter(s -> s.returnGeneratedValues("my_id"))
		.filter(s -> s.fetchSize(25))

Original pull request: #308.
2020-03-17 11:33:21 +01:00
Jens Schauder
ce3eef6827 #301 - Prepare 1.1 M4 (Neumann). 2020-03-11 09:46:29 +01:00
Jens Schauder
63fe35a002 #301 - Updated changelog. 2020-03-11 09:46:23 +01:00
Mark Paluch
228c6748bf #316 - Adapt to Mockito 3.3.
Mockito reports falsely unnecessary stubbings so we're switching to the silent runner for these cases.
2020-03-11 09:04:40 +01:00
Jens Schauder
ed297c08fe #289 - Polishing.
Refactored DefaultDatabaseClientUnitTests in order to make the relevant differences in setup easier to spot.
Formatting and nullability annotations.

Original pull request: #307.
2020-03-10 16:15:02 +01:00