Commit Graph

61 Commits

Author SHA1 Message Date
Mark Paluch
fcd9cc75dd #36 - Prepare 1.0 M1. 2018-12-12 14:07:12 +01:00
Mark Paluch
8f8462d8fd #36 - Updated changelog. 2018-12-12 14:07:11 +01:00
Mark Paluch
db24229bf4 #35 - Simplify reference documentation setup. 2018-12-10 10:24:41 +01:00
Mark Paluch
9f68352ac7 #30 - Address review feedback.
Introduce ArrayColumns type to encapsulate Dialect-specific array support.
Apply array conversion for properties that do not match the native array type.
Add integration tests for Postgres array columns.

Original pull request: #31.
2018-12-07 11:50:42 +01:00
Jens Schauder
be5383abed #30 - Polishing.
Minor formatting. Add suggestions.

Update src/test/java/org/springframework/data/r2dbc/dialect/PostgresDialectUnitTests.java

Co-Authored-By: mp911de <mpaluch@paluch.biz>

Original pull request: #31.
2018-12-07 11:50:22 +01:00
Mark Paluch
c357e5b543 #30 - Add custom conversion support.
We now support custom conversions via R2dbcCustomConversions.
Custom conversions introduces simple types that depend on the used dialect.
Custom conversions and simple types are held in RelationalConverter and MappingContext.

Simple types and conversions are used by DatabaseClient and repository support to properly apply registered converters and support native types such as array-columns.

Related tickets: #22, #26.
Original pull request: #31.
2018-12-07 11:49:47 +01:00
Mark Paluch
06c2a3a246 #22 - Polishing.
Add author tag. Add unit test for EntityRowMapper.

Original pull request: #31.
2018-12-07 11:49:15 +01:00
Ryland Degnan
f325f45fb6 #22 - Remove restriction on CollectionLike types.
EntityRowMapper now passes-thru values for Collection-like types such as array.
Arrays are supported by Postgres.

Original pull request: #22.
2018-12-07 11:48:26 +01:00
Mark Paluch
9e3601a06d #8 - Reduce API surface for mapped tabular results.
Move retrieval methods from FetchSpec into RowsFetchSpec and UpdatedRowsFetchSpec.

map(…) now returns RowsFetchSpec to not expose updated rows count as mapped results are consumed as objects.

Original pull request: #33.
2018-12-07 11:39:16 +01:00
Mark Paluch
6ad31abd79 #8 - Address review feedback.
Remove unused code from AbstractDatabaseClientIntegrationTests.
Use literal null instead of code null for consistency.

Original pull request: #33.
2018-12-07 11:39:03 +01:00
Jens Schauder
7db8e64393 #8 - Polishing.
Formatting, JavaDoc, issue comments on `@Test` annotations.
Removed some dead code.

Original pull request: #33.
2018-12-07 11:38:52 +01:00
Mark Paluch
5a5310af4d #8 - Replace exchange() method with map(…) and then() methods.
DatabaseClient now no longer exposes the exchange() method but rather provides map(…) and then(…) methods.
Calling map(…) extracts values from tabular results by propagating the mapping function to Result.map(…).
then() allows statement execution without returning the result propagating only completion and error signals.

Original pull request: #33.
2018-12-07 11:38:03 +01:00
Mark Paluch
536d484012 #32 - Drop oracle-java8-installer from TravisCI build. 2018-12-04 09:55:43 +01:00
Jens Schauder
8461545670 #25 - Polishing.
Fix typos. Improve wording. Replace document with row and collection with table.

Original pull request: #28.
2018-12-04 09:53:31 +01:00
Mark Paluch
a6140b8ba8 #25 - Add reference documentation.
Original pull request: #28.
2018-12-04 09:53:26 +01:00
Jens Schauder
0aa623280f #20 - Polishing.
Rename Database.latestDialect() to defaultDialect(). Rename Dialect.returnGeneratedKeys() to Dialect.generatedKeysClause(). Simplify IndexBindMarkers. Create BindableOperation.bind(Statement, SettableValue) to reduce code duplicates. Rename BindSpecWrapper to BindSpecAdapter.

Original pull request: #24.
2018-12-03 16:01:39 +01:00
Mark Paluch
68f1e0b0b3 #20 - Add Dialect initial support for H2, PostgreSQL, and Microsoft SQL Server.
We now provide dialect support for H2, PostgreSQL, and Microsoft SQL Server databases, configurable through AbstractR2dbcConfiguration. By default, we obtain the Dialect by inspecting ConnectionFactoryMetadata to identify the database and the most likely dialect to use.

BindableOperation encapsulates statements/queries that can accept parameters. Use BindableOperation for statements through DatabaseClient.
Extract SQL creation.

Split integration test into abstract base class that can be implemented with a database-specific test class.

Original pull request: #24.
2018-12-03 16:01:35 +01:00
Mark Paluch
dc3a0d5fc4 #27 - Add project site redirect. 2018-11-27 14:28:13 +01:00
Mark Paluch
6ba8fd0ca2 #21 - Upgrade to R2DBC 1.0M6. 2018-11-21 10:25:50 +01:00
Christoph Strobl
9f7d3863e5 #13 - Polishing.
Add missing header & package-info. Update nullability and add tests.

Original pull request: #17.
2018-11-21 10:21:17 +01:00
Mark Paluch
6267047f17 #16 - Add abstract configuration class for R2DBC.
We now provide an abstract R2DBC configuration that registers beans required for R2DBC's DatabaseClient.

Original pull request: #17.
2018-11-21 10:21:14 +01:00
Mark Paluch
881c97784b #13 - Add @EnableR2dbcRepositories.
We now provide an annotation-based activation model for R2DBC repositories. Configuration classes can be annotated with @EnableR2dbcRepositories and configuration infrastructure will scan for bean definitions to implement declared R2DBC repositories.

Original pull request: #17.
2018-11-21 10:21:07 +01:00
Mark Paluch
5df9b355eb #15 - Incorporate review feedback.
Improve Javadoc. Rename parameters for more expressiveness. Replace ASCII filtering with filter Function to move actual filtering into dialects.

Original pull request: #19.
2018-11-21 10:16:14 +01:00
Mark Paluch
9700c3c087 #15 - Add BindMarkers abstraction.
We now expose a bind marker API that allows to model a vendor-specific bind marker strategy. The currently supported database systems (Postgres, MsSql) implement indexed respective named strategies that differ in how placeholders and identifiers are generated.

Original pull request: #19.
2018-11-21 10:16:05 +01:00
Mark Paluch
f85a9a084f #18 - Cleanup pom.xml and upgrade dependencies.
Remove dependency management for Surefire and Dependency plugins. Upgrade to latest Postgres and H2 drivers. Upgrade to testcontainers 10.0.1.
2018-11-19 13:48:06 +01:00
Mark Paluch
226c80fb02 #12 - Retain input item order in save(…) methods.
We now use concatMap(…) instead of flatMap(…) when saving items to retain output item order.
2018-11-12 15:13:19 +01:00
Mark Paluch
93ddaff3c2 #11 - Adapt Statement.bind(…) calls to newly introduced positional (integer-arg) binding.
We now use bind(int, …) methods to bind parameters by index.
2018-11-12 15:04:29 +01:00
Mark Paluch
c2ebfb8cd3 #10 - Adapt to removed Statement.executeReturningGeneratedKeys(). 2018-11-12 15:00:27 +01:00
Jens Schauder
07811a40f5 #5 - Use OpenJdk build.
JDK 11 build is no longer optional.
2018-10-30 07:46:08 +01:00
Mark Paluch
34ddfda0c0 #2 - Polishing.
Fix GitHub issues url.
2018-10-17 11:21:33 +02:00
Mark Paluch
12dc98bcbd #2 - Polishing. 2018-10-17 11:11:16 +02:00
Mark Paluch
ce0a707500 #2 - Upgrade to R2DBC 1.0M5. 2018-10-17 11:11:15 +02:00
Mark Paluch
d60d8b04a0 #2 - Switch dependency test to assumption. 2018-10-17 11:11:13 +02:00
Mark Paluch
b6a8c81289 #2 - Document R2DBC capabilities. 2018-10-17 11:11:12 +02:00
Mark Paluch
a5e2a8e61f #2 - Polishing.
Introduce customization hook methods. Rename DefaultTypedGenericExecuteSpec to DefaultTypedExecuteSpec and GenericExecuteSpecSupport to ExecuteSpecSupport as types are not tied to generic execution. Encapsulate fields in DatabaseClient builders.
2018-10-17 11:11:10 +02:00
Mark Paluch
20eb2c1a6d #2 - Resolve package cycle between r2dbc.function and r2dbc.function.convert. 2018-10-17 11:11:09 +02:00
Mark Paluch
f223475112 #2 - Adapt to R2DBC API changes. 2018-10-17 11:11:07 +02:00
Mark Paluch
1464df99d4 #2 - Add transactional support.
We now support transaction hosting and transaction management via TransactionalDatabaseClient.

TransactionalDatabaseClient databaseClient = TransactionalDatabaseClient.create(connectionFactory);

Flux<Integer> integerFlux = databaseClient.inTransaction(db -> {

	return db.execute().sql("INSERT INTO legoset (id, name, manual) VALUES($1, $2, $3)") //
			.bind(0, 42055) //
			.bind(1, "SCHAUFELRADBAGGER") //
			.bindNull("$3") //
			.fetch().rowsUpdated();
});
2018-10-17 11:11:06 +02:00
Oliver Gierke
853b3fb449 #2 - Adapt code to API changes. 2018-10-17 11:11:05 +02:00
Jens Schauder
bea95010ae #2 - Fixes and improves the Dependency test.
Now considers the new packages appropriately as well.
consideres the `repository` package to be part of the sub-module `repository.reactive`.
2018-10-17 11:11:03 +02:00
Mark Paluch
900918fa54 #2 - Use java.lang.Long as fallback Id type.
We now use java.lang.Long as fallback Id type for entities that do not declare an explicit Id property. Previously we used ObjectId which was a left-over from the initial draft of MappingRelationalEntityInformation.
2018-10-17 11:11:02 +02:00
Mark Paluch
cccc3808aa #2 - Polishing. 2018-10-17 11:11:00 +02:00
Mark Paluch
831e753658 #2 - Introduce R2DBC exception translation.
We now provide exception translation for R2DBC exceptions based on Spring JDBC's SQLErrorCodes.
2018-10-17 11:10:58 +02:00
Mark Paluch
368835c128 #2 - Remove intermediate repositories for GitHub-hosted Maven artifacts. 2018-10-17 11:10:57 +02:00
Oliver Gierke
c59ba067cc #2 - EntityRowMapper now prevents constructor argument properties from being read twice. 2018-10-17 11:10:55 +02:00
Mark Paluch
8b006abbe5 #2 - Create relational and r2dbc packages.
Move types into relational and r2dbc packages in preparation for a later module separation.
2018-10-17 11:10:54 +02:00
Mark Paluch
cee7479cd0 #2 - Exclude reactive repositories from JdbcRepositoryConfigExtension. 2018-10-17 11:10:51 +02:00
Mark Paluch
9d9c665f76 #2 - Polishing. 2018-10-17 11:10:50 +02:00
Mark Paluch
f794bfc3ab #2 - Add R2dbcRepositoryFactory and simple query subsystem. 2018-10-17 11:10:48 +02:00
Mark Paluch
28dee1274f #2 - Add updates to SimpleR2dbcRepository. 2018-10-17 11:10:45 +02:00