[jOOQ/jOOQ#12193] Upgrade R2DBC dependency to 0.9.0.RELEASE

This commit is contained in:
Lukas Eder 2021-12-09 10:46:33 +01:00
parent 4f25c51d03
commit 9db4680140
2 changed files with 21 additions and 12 deletions

View File

@ -482,9 +482,18 @@ final class R2DBC {
Rendered rendered = rendered(batch.configuration, batch.query);
Statement stmt = c.createStatement(rendered.sql);
Param<?>[] params = rendered.bindValues.toArray(EMPTY_PARAM);
boolean first = true;
for (Object[] bindValues : batch.allBindValues) {
// Change of specification in 0.9.0.RELEASE:
// No trailing add() calls are allowed anymore
// https://github.com/r2dbc/r2dbc-spi/issues/229
if (first)
first = false;
else
stmt = stmt.add();
// [#1371] [#2139] Don't bind variables directly onto statement, bind them through the collected params
// list to preserve type information
// [#3547] The original query may have no Params specified - e.g. when it was constructed with
@ -493,8 +502,6 @@ final class R2DBC {
(params.length > 0)
? fields(bindValues, params)
: fields(bindValues));
stmt = stmt.add();
}
stmt.execute().subscribe(new RowCountSubscriber(downstream));

22
pom.xml
View File

@ -39,7 +39,7 @@
<redshift.version>2.0.0.6</redshift.version>
<!-- R2DBC SPI version and some matching driver versions -->
<io.r2dbc.version>0.9.0.M2</io.r2dbc.version>
<io.r2dbc.version>0.9.0.RELEASE</io.r2dbc.version>
<!-- From JDK 11 onwards, we need to depend on the JAXB API explicitly -->
<jaxb.version>3.0.0</jaxb.version>
@ -140,11 +140,6 @@
</dependency>
<!-- R2DBC SPI and driver dependencies -->
<dependency>
<groupId>io.r2dbc</groupId>
<artifactId>r2dbc-spi</artifactId>
<version>${io.r2dbc.version}</version>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
@ -155,20 +150,27 @@
<artifactId>reactor-test</artifactId>
<version>3.4.7</version>
</dependency>
<!-- At the point of release 3.16, it seems not all drivers have been upgraded to 0.9.0.RELEASE yet -->
<dependency>
<groupId>io.r2dbc</groupId>
<artifactId>r2dbc-spi</artifactId>
<version>${io.r2dbc.version}</version>
</dependency>
<dependency>
<groupId>io.r2dbc</groupId>
<artifactId>r2dbc-h2</artifactId>
<version>0.9.0.M1</version>
<version>[0.9.0.M1,${io.r2dbc.version}]</version>
</dependency>
<dependency>
<groupId>org.mariadb</groupId>
<artifactId>r2dbc-mariadb</artifactId>
<version>1.1.0-beta</version>
<version>1.1.1-rc</version>
</dependency>
<dependency>
<groupId>io.r2dbc</groupId>
<artifactId>r2dbc-mssql</artifactId>
<version>${io.r2dbc.version}</version>
<version>[0.9.0.RC1,${io.r2dbc.version}]</version>
</dependency>
<dependency>
<groupId>com.oracle.database.r2dbc</groupId>
@ -178,7 +180,7 @@
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>r2dbc-postgresql</artifactId>
<version>${io.r2dbc.version}</version>
<version>[0.9.0.RC1,${io.r2dbc.version}]</version>
</dependency>
<dependency>