Refactor Spring Data R2DBC on top of Spring R2DBC#412
Refactor Spring Data R2DBC on top of Spring R2DBC#412
Conversation
schauder
left a comment
There was a problem hiding this comment.
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.
"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.
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.
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.
| * 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.
I couldn't find a matching replacement for this.
Maybe there isn't any?
| * @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.
I couldn't find a replacement class. We should clarify where to find it.
| * | ||
| * @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.
Again, couldn't find a replacement.
| * @see OutboundRow | ||
| * @deprecated since 1.2, use Spring R2DBC's {@link Parameter} directly. | ||
| */ | ||
| @Deprecated |
There was a problem hiding this comment.
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.
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.
| * @see OutboundRow | ||
| * @deprecated since 1.2, use Spring R2DBC's {@link Parameter} directly. | ||
| */ | ||
| @Deprecated |
There was a problem hiding this comment.
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.DatabaseClientin favor oforg.springframework.r2dbc.core.DatabaseClient.Components on top of
DatabaseClientshould be rewritten to use Spring Framework's R2DBC variants. In particular:DatabaseClientand all necessary infrastructure classes/interfacesColumnMapRowMapperandSettableValueAbstractR2dbcConfigurationconnectionfactorypackage in favor oforg.springframework.r2dbc.connectionfactorysupportpackage in favor oforg.springframework.r2dbc.connectionfactoryDatabaseClientinR2dbcEntityTemplateand the repository support classes