-
Notifications
You must be signed in to change notification settings - Fork 132
Refactor Spring Data R2DBC on top of Spring R2DBC #412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should DatabaseClientExtension.kt
get deprecation information as well?
I left a couple of comments and added a commit to the PR.
* `R2dbcDialect` | ||
* Types in `org.springframework.data.r2dbc.query` | ||
|
||
We recommend that you review your imports if you work with these types directly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"review" is a rather weak verb.
Ok, I looked at my imports, now what?
=== Usage of replacements provided by Spring R2DBC | ||
|
||
To ease migration, several deprecated types are now subtypes of their replacements provided by Spring R2DBC. Spring Data R2DBC has changes several methods or introduced new methods accepting Spring R2DBC types. | ||
Specifically the following classes are affected: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are affected -> changed
(prefere active voice)
|
||
To make use of Spring R2DBC, make sure to include the following dependency: | ||
|
||
* `org.springframework:spring-r2dbc` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should be done by the build tool for 99.9% of the users, shouldn't it?
I there for just mention it in the starting paragraph, that spring-data-r2dbc
now depends on spring-r2dbc
.
@@ -27,7 +27,9 @@ | |||
* Utility methods for executing a {@link DatabasePopulator}. | |||
* | |||
* @author Mark Paluch | |||
* @deprecated since 1.2 in favor of Spring R2DBC. Use {@link org.springframework.r2dbc.connection.init} instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find a matching replacement for this.
Maybe there isn't any?
@@ -23,8 +23,10 @@ | |||
* @author Mark Paluch | |||
* @see SimpleConnectionHandle | |||
* @see ConnectionHolder | |||
* @deprecated since 1.2 in favor of Spring R2DBC. Use {@link org.springframework.r2dbc.connection} instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find a replacement class. We should clarify where to find it.
@@ -27,7 +27,9 @@ | |||
* | |||
* @author Mark Paluch | |||
* @see ConnectionFactoryUtils#closeConnection | |||
* @deprecated since 1.2 in favor of Spring R2DBC. Use {@link org.springframework.r2dbc.connection} instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, couldn't find a replacement.
*/ | ||
@Deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a couple of usages of this outside deprecated classes/ interfaces, e.g. ReactiveDataAccessStrategy.getBindValue(SettableValue)
.
I wonder if we should add deprecations to those methods as well, in order to point to the right replacement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SettableValue
is used in the deprecated DatabaseClient
and considered in query/update mappers for a smoother upgrade experience.
We don't want to deprecate update/query mappers but gradually remove support for SettableValue
.
*/ | ||
@Deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some comments referring to it, wich should refer to Parameter
instead. Again an example is ReactiveDataAccessStrategy.getBindValue(Parameter)
.
This commit deprecates API that has been moved to Spring R2DBC.
We now use Spring R2DBC DatabaseClient and utilities to implement Spring Data R2DBC functionality.
This commit deprecates API that has been moved to Spring R2DBC. Original pull request: #412.
We now use Spring R2DBC DatabaseClient and utilities to implement Spring Data R2DBC functionality. Original pull request: #412.
That's merged now. |
Line breaks after dots in ascii doctor file for easier reading of the source files. Adds specific deprecation links instead of just links to the general package. Removes an unused private method in `ConnectionFactoryUtils` Original pull request: #412.
Spring Framework aims to include foundational R2DBC support in a similar way to Spring JDBC. We should adopt to these changes by deprecating
org.springframework.data.r2dbc.core.DatabaseClient
in favor oforg.springframework.r2dbc.core.DatabaseClient
.Components on top of
DatabaseClient
should be rewritten to use Spring Framework's R2DBC variants. In particular:DatabaseClient
and all necessary infrastructure classes/interfacesColumnMapRowMapper
andSettableValue
AbstractR2dbcConfiguration
connectionfactory
package in favor oforg.springframework.r2dbc.connectionfactory
support
package in favor oforg.springframework.r2dbc.connectionfactory
DatabaseClient
inR2dbcEntityTemplate
and the repository support classes