-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Add support for R2DBC #25065
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
Add support for R2DBC #25065
Conversation
The Data Access section would be a logical place for it. A short section could also be added under WebFlux mostly for discoverability, similar to how Spring MVC has a section about REST clients which are otherwise in other sections. |
A few notes from a first pass of mine:
|
Aside from missing original |
Specifically about the connection handling business in Also, I wonder whether we need EE-style decoration of a transaction-aware |
A specific note on Talking about exception translation there, |
Thanks for having a look. Here are my thoughts on the mentioned items:
In general, I'm happy to reduce the API surface and move things around for the parts that lived in JDBC only to cater for JPA reasons. |
Shortening As for the SQL state exception parsing, I'm rather strongly aiming to avoid this here. Over there in JDBC land, it is an old and hard-coded arrangement of very specific vendor codes, largely outlived by the JDBC 4 exception subclass support for a long time already. Since this is just about throwing more specific exception subclasses, it's not too bad if a particular driver does not distinguish much at all. I do not want our code to make up for a lack of sophistication in the drivers here... again. The appropriate target for a user to request finer-grained exception translation is the driver vendor. Collapsing Our JDBC support was very maintenance intensive over the years, in particular due to its many vendor-specific checks (also for parameter type determination, value extraction, stored procedure handling). We have a clean plate to start with here, let's keep it as streamlined as possible. |
Some further notes about the
|
I applied the discussed changes. Let me know if there's anything missing. I also experimented with the method naming of
The
I will add the documentation bits early next week. |
86f65b2
to
e888061
Compare
@mp911de This looks good to me so far, ready to get merged as a first cut. @sbrannen Any immediate input on the |
FTR: I omitted the |
I'm reviewing it now and will get back to you.
Two of them were already in place since 3.0. When I reworked
Yes, indeed: directly related. |
I don't think there's anything urgent that needs to be addressed before the initial merge. However, I reviewed the status quo and came up with some topics for discussion.
|
Let's merge this after the 5.2.7 release tomorrow (which unfortunately keeps us busier than expected), maybe on Wednesday this week? We may then follow up with refinements on master right afterwards. |
@mp911de Since we seem to have a conflict in the dependency declarations, it'd be great if you could rebase your branch and update to Arabba-SR4 in preparation for a merge to master... I'd also appreciate a quick final review pass over it from your side before Sam and I take over :-) |
This commit introduces support for R2DBC ("Reactive Relational Database Connectivity") with custom ConnectionFactory implementations, a functional DatabaseClient for SQL execution, transaction management, a bind marker abstraction database initialization utilities and exception translation.
Refactor DatabasePopulatorUtils.execute(…) into default method DatabasePopulator.populate(…). Add support for commentPrefixes in ResourceDatabasePopulator.
Refactor DatabasePopulatorUtils.execute(…) into default method DatabasePopulator.populate(…). Add support for commentPrefixes in ResourceDatabasePopulator. Consistently use code instead of literal in Javadoc for boolean and null values.
Done. Rebased and ready for you to take over. |
This first cut for the R2DBC support has been merged into Kudos to @mp911de and @christophstrobl! |
The |
This commit introduces support for R2DBC ("Reactive Relational Database Connectivity") with custom ConnectionFactory implementations, a functional DatabaseClient for SQL execution, transaction management, a bind marker abstraction database initialization utilities, and exception translation. Closes spring-projectsgh-25065
This commit introduces support for R2DBC
("Reactive Relational Database Connectivity") with custom
ConnectionFactory implementations, a functional DatabaseClient for
SQL execution, transaction management, a bind marker abstraction
database initialization utilities and exception translation.
Open issues:
ScriptUtils
and friends :: to be addressed in Revisit ScriptUtils and related classes in spring-r2dbc #25275.