spring-projects / spring-framework

Spring Framework
https://spring.io/projects/spring-framework
Apache License 2.0
56.75k stars 38.15k forks source link

Add batch operations support to `DatabaseClient` #33812

Open sdeleuze opened 4 weeks ago

sdeleuze commented 4 weeks ago

As discussed in #27229, this issue intends to add support to batch operations support to R2DBC DatabaseClient.

The starting point is bind(params -> …) as proposed in this comment of the PR, but we should also support iterating over a collection without requiring a wrapper class or an AtomicReference.

Another concern is that bind(params -> …) looks too implicit in terms of name, could confuse users versus bindValues(List<?> source) which has a totally different meaning.

Depending on how the implementation goes, we may create a follow-up issue for a similar feature in JdbcClient.