[jOOQ/jOOQ#12193] Upgrade R2DBC dependency to 0.9.0.M2
This commit is contained in:
parent
0921b2331d
commit
40d216689b
@ -39,6 +39,8 @@ package org.jooq.impl;
|
||||
|
||||
import static org.jooq.impl.R2DBC.AbstractSubscription.onRequest;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import org.jooq.exception.DetachedException;
|
||||
|
||||
import org.reactivestreams.Publisher;
|
||||
@ -92,6 +94,11 @@ final class DefaultConnectionFactory implements ConnectionFactory {
|
||||
}
|
||||
|
||||
private final class NonClosingConnection implements Connection {
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// 0.9.0.M1 API
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Publisher<Void> beginTransaction() {
|
||||
return connectionOrThrow().beginTransaction();
|
||||
@ -171,5 +178,19 @@ final class DefaultConnectionFactory implements ConnectionFactory {
|
||||
public Publisher<Boolean> validate(ValidationDepth depth) {
|
||||
return connectionOrThrow().validate(depth);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// 0.9.0.M2 API
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Publisher<Void> setLockWaitTimeout(Duration timeout) {
|
||||
return connectionOrThrow().setLockWaitTimeout(timeout);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Publisher<Void> setStatementTimeout(Duration timeout) {
|
||||
return connectionOrThrow().setStatementTimeout(timeout);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,6 +43,7 @@ import static org.jooq.impl.ParsingConnection.translate;
|
||||
import static org.jooq.impl.R2DBC.setParamType;
|
||||
import static org.jooq.impl.Tools.EMPTY_PARAM;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -127,6 +128,20 @@ final class ParsingConnectionFactory implements ConnectionFactory {
|
||||
this.delegate = delegate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Batch createBatch() {
|
||||
return new ParsingR2DBCBatch(delegate.createBatch());
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Statement createStatement(String sql) {
|
||||
return new ParsingR2DBCStatement(delegate, sql);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// 0.9.0.M1 API
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public final Publisher<Void> beginTransaction() {
|
||||
return delegate.beginTransaction();
|
||||
@ -197,14 +212,18 @@ final class ParsingConnectionFactory implements ConnectionFactory {
|
||||
return delegate.validate(depth);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// 0.9.0.M2 API
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public final Batch createBatch() {
|
||||
return new ParsingR2DBCBatch(delegate.createBatch());
|
||||
public final Publisher<Void> setLockWaitTimeout(Duration timeout) {
|
||||
return delegate.setLockWaitTimeout(timeout);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Statement createStatement(String sql) {
|
||||
return new ParsingR2DBCStatement(delegate, sql);
|
||||
public final Publisher<Void> setStatementTimeout(Duration timeout) {
|
||||
return delegate.setStatementTimeout(timeout);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1094,6 +1094,10 @@ final class R2DBC {
|
||||
|
||||
private static final /* record */ class DefaultRow implements Row { private final Configuration c; private final Row r; public DefaultRow(Configuration c, Row r) { this.c = c; this.r = r; } public Configuration c() { return c; } public Row r() { return r; } @Override public boolean equals(Object o) { if (!(o instanceof DefaultRow)) return false; DefaultRow other = (DefaultRow) o; if (!java.util.Objects.equals(this.c, other.c)) return false; if (!java.util.Objects.equals(this.r, other.r)) return false; return true; } @Override public int hashCode() { return java.util.Objects.hash(this.c, this.r); } @Override public String toString() { return new StringBuilder("DefaultRow[").append("c=").append(this.c).append(", r=").append(this.r).append("]").toString(); }
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// 0.9.0.M1 API
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
// These methods are proxied for some drivers that can't convert
|
||||
// between data types. See:
|
||||
// - https://github.com/mirromutth/r2dbc-mysql/issues/177
|
||||
@ -1134,6 +1138,15 @@ final class R2DBC {
|
||||
else
|
||||
return converter.from(o);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// 0.9.0.M2 API
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public final RowMetadata getMetadata() {
|
||||
return r.getMetadata();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
6
pom.xml
6
pom.xml
@ -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.M1</io.r2dbc.version>
|
||||
<io.r2dbc.version>0.9.0.M2</io.r2dbc.version>
|
||||
|
||||
<!-- From JDK 11 onwards, we need to depend on the JAXB API explicitly -->
|
||||
<jaxb.version>2.3.1</jaxb.version>
|
||||
@ -157,12 +157,12 @@
|
||||
<dependency>
|
||||
<groupId>io.r2dbc</groupId>
|
||||
<artifactId>r2dbc-h2</artifactId>
|
||||
<version>0.8.4.RELEASE</version>
|
||||
<version>0.9.0.M1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mariadb</groupId>
|
||||
<artifactId>r2dbc-mariadb</artifactId>
|
||||
<version>1.0.1</version>
|
||||
<version>1.1.0-beta</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.r2dbc</groupId>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user