diff --git a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/Binding.java b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/Binding.java
index a98b612d0..fc0166a09 100644
--- a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/Binding.java
+++ b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/Binding.java
@@ -22,9 +22,9 @@
import java.util.Arrays;
/**
- * A collection of {@link MySqlParameter} for one bind invocation of a parametrized statement.
+ * A collection of {@link MySqlParameter} for one bind invocation of a parameterized statement.
*
- * @see ParametrizedStatementSupport
+ * @see ParameterizedStatementSupport
*/
final class Binding {
@@ -40,7 +40,7 @@ final class Binding {
* Add a {@link MySqlParameter} to the binding.
*
* @param index the index of the {@link MySqlParameter}
- * @param value the {@link MySqlParameter} from {@link PrepareParametrizedStatement}
+ * @param value the {@link MySqlParameter} from {@link PrepareParameterizedStatement}
*/
void add(int index, MySqlParameter value) {
if (index < 0 || index >= this.values.length) {
diff --git a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/MySqlConnectionConfiguration.java b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/MySqlConnectionConfiguration.java
index c165cf4b7..3856b58bd 100644
--- a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/MySqlConnectionConfiguration.java
+++ b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/MySqlConnectionConfiguration.java
@@ -883,7 +883,7 @@ public Builder tcpNoDelay(boolean enabled) {
}
/**
- * Configures the protocol of parametrized statements to the text protocol.
+ * Configures the protocol of parameterized statements to the text protocol.
*
* The text protocol is default protocol that's using client-preparing. See also MySQL
* documentations.
@@ -897,7 +897,7 @@ public Builder useClientPrepareStatement() {
}
/**
- * Configures the protocol of parametrized statements to the binary protocol.
+ * Configures the protocol of parameterized statements to the binary protocol.
*
* The binary protocol is compact protocol that's using server-preparing. See also MySQL
* documentations.
@@ -910,7 +910,7 @@ public Builder useServerPrepareStatement() {
}
/**
- * Configures the protocol of parametrized statements and prepare-preferred simple statements to the
+ * Configures the protocol of parameterized statements and prepare-preferred simple statements to the
* binary protocol.
*
* The {@code preferPrepareStatement} configures whether to prefer prepare execution on a
@@ -1025,7 +1025,7 @@ public Builder queryCacheSize(int queryCacheSize) {
/**
* Configures the maximum size of the server-preparing cache. Usually it should be power of two.
* Default to {@code 256}. Driver will use unbounded cache if size is less than {@code 0}. It is used
- * only if using server-preparing parametrized statements, i.e. the {@link #useServerPrepareStatement}
+ * only if using server-preparing parameterized statements, i.e. the {@link #useServerPrepareStatement}
* is set.
*
* Notice: the cache is using EC model (the PACELC theorem) for ensure consistency. Consistency is
diff --git a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/MySqlConnectionFactoryProvider.java b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/MySqlConnectionFactoryProvider.java
index 88771a372..f6dc1a57a 100644
--- a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/MySqlConnectionFactoryProvider.java
+++ b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/MySqlConnectionFactoryProvider.java
@@ -201,14 +201,14 @@ public final class MySqlConnectionFactoryProvider implements ConnectionFactoryPr
Option.valueOf("createDatabaseIfNotExist");
/**
- * Enable server preparing for parametrized statements and prefer server preparing simple statements.
+ * Enable server preparing for parameterized statements and prefer server preparing simple statements.
*
* The value can be a {@link Boolean}. If it is {@code true}, driver will use server preparing for
- * parametrized statements and text query for simple statements. If it is {@code false}, driver will use
- * client preparing for parametrized statements and text query for simple statements.
+ * parameterized statements and text query for simple statements. If it is {@code false}, driver will use
+ * client preparing for parameterized statements and text query for simple statements.
*
* The value can be a {@link Predicate}{@code <}{@link String}{@code >}. If it is set, driver will server
- * preparing for parametrized statements, it configures whether to prefer prepare execution on a
+ * preparing for parameterized statements, it configures whether to prefer prepare execution on a
* statement-by-statement basis (simple statements). The {@link Predicate}{@code <}{@link String}{@code >}
* accepts the simple SQL query string and returns a {@code boolean} flag indicating preference.
*
diff --git a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/MySqlSimpleConnection.java b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/MySqlSimpleConnection.java
index e59a70c6d..660e25e06 100644
--- a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/MySqlSimpleConnection.java
+++ b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/MySqlSimpleConnection.java
@@ -256,13 +256,13 @@ public MySqlStatement createStatement(String sql) {
}
if (prepare == null) {
- logger.debug("Create a parametrized statement provided by text query");
- return new TextParametrizedStatement(client, codecs, query);
+ logger.debug("Create a parameterized statement provided by text query");
+ return new TextParameterizedStatement(client, codecs, query);
}
- logger.debug("Create a parametrized statement provided by prepare query");
+ logger.debug("Create a parameterized statement provided by prepare query");
- return new PrepareParametrizedStatement(client, codecs, query, prepareCache);
+ return new PrepareParameterizedStatement(client, codecs, query, prepareCache);
}
@Override
diff --git a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/ParameterWriter.java b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/ParameterWriter.java
index fa52a1f69..590762bc4 100644
--- a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/ParameterWriter.java
+++ b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/ParameterWriter.java
@@ -25,7 +25,7 @@
import java.nio.ByteBuffer;
/**
- * A writer for {@link MySqlParameter}s of parametrized statements with text-based protocol.
+ * A writer for {@link MySqlParameter}s of parameterized statements with text-based protocol.
*/
public abstract class ParameterWriter extends Writer {
diff --git a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/ParametrizedStatementSupport.java b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/ParameterizedStatementSupport.java
similarity index 95%
rename from r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/ParametrizedStatementSupport.java
rename to r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/ParameterizedStatementSupport.java
index bb37b31ec..2b1d64ed5 100644
--- a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/ParametrizedStatementSupport.java
+++ b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/ParameterizedStatementSupport.java
@@ -34,12 +34,12 @@
import static io.asyncer.r2dbc.mysql.internal.util.AssertUtils.requireNonNull;
/**
- * Base class considers parametrized {@link MySqlStatement} with parameter markers.
+ * Base class considers parameterized {@link MySqlStatement} with parameter markers.
*
* MySQL uses indexed parameters which are marked by {@literal ?} without naming. Implementations should use
* {@link Query} to supports named parameters.
*/
-abstract class ParametrizedStatementSupport extends MySqlStatementSupport {
+abstract class ParameterizedStatementSupport extends MySqlStatementSupport {
protected final Codecs codecs;
@@ -49,7 +49,7 @@ abstract class ParametrizedStatementSupport extends MySqlStatementSupport {
private final AtomicBoolean executed = new AtomicBoolean();
- ParametrizedStatementSupport(Client client, Codecs codecs, Query query) {
+ ParameterizedStatementSupport(Client client, Codecs codecs, Query query) {
super(client);
requireNonNull(query, "query must not be null");
@@ -113,7 +113,7 @@ public final Flux extends MySqlResult> execute() {
return Flux.defer(() -> {
if (!executed.compareAndSet(false, true)) {
- return Flux.error(new IllegalStateException("Parametrized statement was already executed"));
+ return Flux.error(new IllegalStateException("Parameterized statement was already executed"));
}
return execute(bindings.bindings);
diff --git a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/PrepareParametrizedStatement.java b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/PrepareParameterizedStatement.java
similarity index 86%
rename from r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/PrepareParametrizedStatement.java
rename to r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/PrepareParameterizedStatement.java
index d3f898e89..d9e290811 100644
--- a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/PrepareParametrizedStatement.java
+++ b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/PrepareParameterizedStatement.java
@@ -29,15 +29,15 @@
import static io.asyncer.r2dbc.mysql.internal.util.AssertUtils.require;
/**
- * An implementation of {@link ParametrizedStatementSupport} based on MySQL prepare query.
+ * An implementation of {@link ParameterizedStatementSupport} based on MySQL prepare query.
*/
-final class PrepareParametrizedStatement extends ParametrizedStatementSupport {
+final class PrepareParameterizedStatement extends ParameterizedStatementSupport {
private final PrepareCache prepareCache;
private int fetchSize = 0;
- PrepareParametrizedStatement(Client client, Codecs codecs, Query query, PrepareCache prepareCache) {
+ PrepareParameterizedStatement(Client client, Codecs codecs, Query query, PrepareCache prepareCache) {
super(client, codecs, query);
this.prepareCache = prepareCache;
}
diff --git a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/QueryFlow.java b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/QueryFlow.java
index 8204955ac..e7a5de4bc 100644
--- a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/QueryFlow.java
+++ b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/QueryFlow.java
@@ -87,8 +87,8 @@
import java.util.function.Predicate;
/**
- * A message flow considers both of parametrized and text queries, such as {@link TextParametrizedStatement},
- * {@link PrepareParametrizedStatement}, {@link TextSimpleStatement}, {@link PrepareSimpleStatement} and
+ * A message flow considers both of parameterized and text queries, such as {@link TextParameterizedStatement},
+ * {@link PrepareParameterizedStatement}, {@link TextSimpleStatement}, {@link PrepareSimpleStatement} and
* {@link MySqlBatch}.
*/
final class QueryFlow {
diff --git a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/TextParametrizedStatement.java b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/TextParameterizedStatement.java
similarity index 82%
rename from r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/TextParametrizedStatement.java
rename to r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/TextParameterizedStatement.java
index 109fb7ba6..84249cb03 100644
--- a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/TextParametrizedStatement.java
+++ b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/TextParameterizedStatement.java
@@ -24,11 +24,11 @@
import java.util.List;
/**
- * An implementation of {@link ParametrizedStatementSupport} based on MySQL text query.
+ * An implementation of {@link ParameterizedStatementSupport} based on MySQL text query.
*/
-final class TextParametrizedStatement extends ParametrizedStatementSupport {
+final class TextParameterizedStatement extends ParameterizedStatementSupport {
- TextParametrizedStatement(Client client, Codecs codecs, Query query) {
+ TextParameterizedStatement(Client client, Codecs codecs, Query query) {
super(client, codecs, query);
}
diff --git a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/api/MySqlStatement.java b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/api/MySqlStatement.java
index a1eff204d..6bc57c99f 100644
--- a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/api/MySqlStatement.java
+++ b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/api/MySqlStatement.java
@@ -35,7 +35,7 @@ public interface MySqlStatement extends Statement {
* {@inheritDoc}
*
* @return {@link MySqlStatement this}
- * @throws IllegalStateException if the statement is parametrized and not all parameters are provided
+ * @throws IllegalStateException if the statement is parameterized and not all parameters are provided
*/
@Override
MySqlStatement add();
@@ -96,7 +96,7 @@ public interface MySqlStatement extends Statement {
* {@inheritDoc}
*
* @return a {@link Flux} representing {@link MySqlResult}s of the statement
- * @throws IllegalStateException if the statement is parametrized and not all parameters are provided
+ * @throws IllegalStateException if the statement is parameterized and not all parameters are provided
*/
@Override
Flux extends MySqlResult> execute();
diff --git a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/Codec.java b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/Codec.java
index c970c212f..9bd116198 100644
--- a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/Codec.java
+++ b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/Codec.java
@@ -24,7 +24,7 @@
/**
* Codec to encode and decode values based on MySQL data binary/text protocol.
*
- * Use {@link ParametrizedCodec} for support {@code ParameterizedType} encoding/decoding.
+ * Use {@link ParameterizedCodec} for support {@code ParameterizedType} encoding/decoding.
*
* @param the type that is handled by this codec.
*/
diff --git a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/DefaultCodecs.java b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/DefaultCodecs.java
index 882637f10..f609af74f 100644
--- a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/DefaultCodecs.java
+++ b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/DefaultCodecs.java
@@ -44,11 +44,11 @@ final class DefaultCodecs implements Codecs {
private final Codec>[] codecs;
- private final ParametrizedCodec>[] parametrizedCodecs;
+ private final ParameterizedCodec>[] parameterizedCodecs;
private final MassiveCodec>[] massiveCodecs;
- private final MassiveParametrizedCodec>[] massiveParametrizedCodecs;
+ private final MassiveParameterizedCodec>[] massiveParameterizedCodecs;
private final Map> primitiveCodecs;
@@ -56,32 +56,32 @@ private DefaultCodecs(Codec>[] codecs) {
this.codecs = requireNonNull(codecs, "codecs must not be null");
Map> primitiveCodecs = new HashMap<>();
- List> parametrizedCodecs = new ArrayList<>();
+ List> parameterizedCodecs = new ArrayList<>();
List> massiveCodecs = new ArrayList<>();
- List> massiveParamCodecs = new ArrayList<>();
+ List> massiveParamCodecs = new ArrayList<>();
for (Codec> codec : codecs) {
if (codec instanceof PrimitiveCodec>) {
// Primitive codec must be class-based codec, cannot support ParameterizedType.
PrimitiveCodec> c = (PrimitiveCodec>) codec;
primitiveCodecs.put(c.getPrimitiveClass(), c);
- } else if (codec instanceof ParametrizedCodec>) {
- parametrizedCodecs.add((ParametrizedCodec>) codec);
+ } else if (codec instanceof ParameterizedCodec>) {
+ parameterizedCodecs.add((ParameterizedCodec>) codec);
}
if (codec instanceof MassiveCodec>) {
massiveCodecs.add((MassiveCodec>) codec);
- if (codec instanceof MassiveParametrizedCodec>) {
- massiveParamCodecs.add((MassiveParametrizedCodec>) codec);
+ if (codec instanceof MassiveParameterizedCodec>) {
+ massiveParamCodecs.add((MassiveParameterizedCodec>) codec);
}
}
}
this.primitiveCodecs = primitiveCodecs;
this.massiveCodecs = massiveCodecs.toArray(new MassiveCodec>[0]);
- this.massiveParametrizedCodecs = massiveParamCodecs.toArray(new MassiveParametrizedCodec>[0]);
- this.parametrizedCodecs = parametrizedCodecs.toArray(new ParametrizedCodec>[0]);
+ this.massiveParameterizedCodecs = massiveParamCodecs.toArray(new MassiveParameterizedCodec>[0]);
+ this.parameterizedCodecs = parameterizedCodecs.toArray(new ParameterizedCodec>[0]);
}
/**
@@ -230,7 +230,7 @@ private T decodeNormal(NormalFieldValue value, MySqlReadableMetadata metadat
@Nullable
private T decodeNormal(NormalFieldValue value, MySqlReadableMetadata metadata, ParameterizedType type,
boolean binary, CodecContext context) {
- for (ParametrizedCodec> codec : parametrizedCodecs) {
+ for (ParameterizedCodec> codec : parameterizedCodecs) {
if (codec.canDecode(metadata, type)) {
@SuppressWarnings("unchecked")
T result = (T) codec.decode(value.getBufferSlice(), metadata, type, binary, context);
@@ -258,7 +258,7 @@ private T decodeMassive(LargeFieldValue value, MySqlReadableMetadata metadat
@Nullable
private T decodeMassive(LargeFieldValue value, MySqlReadableMetadata metadata, ParameterizedType type,
boolean binary, CodecContext context) {
- for (MassiveParametrizedCodec> codec : massiveParametrizedCodecs) {
+ for (MassiveParameterizedCodec> codec : massiveParameterizedCodecs) {
if (codec.canDecode(metadata, type)) {
@SuppressWarnings("unchecked")
T result = (T) codec.decodeMassive(value.getBufferSlices(), metadata, type, binary, context);
diff --git a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/LocalDateTimeCodec.java b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/LocalDateTimeCodec.java
index 17b09b276..424d969e5 100644
--- a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/LocalDateTimeCodec.java
+++ b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/LocalDateTimeCodec.java
@@ -36,7 +36,7 @@
*
* For now, supports only A.D. calendar in {@link ChronoLocalDateTime}.
*/
-final class LocalDateTimeCodec implements ParametrizedCodec {
+final class LocalDateTimeCodec implements ParameterizedCodec {
static final LocalDateTimeCodec INSTANCE = new LocalDateTimeCodec();
diff --git a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/MassiveParametrizedCodec.java b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/MassiveParameterizedCodec.java
similarity index 94%
rename from r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/MassiveParametrizedCodec.java
rename to r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/MassiveParameterizedCodec.java
index e43af83d8..7c501bda0 100644
--- a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/MassiveParametrizedCodec.java
+++ b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/MassiveParameterizedCodec.java
@@ -28,7 +28,7 @@
*
* @param the type that is handled by this codec.
*/
-public interface MassiveParametrizedCodec extends ParametrizedCodec, MassiveCodec {
+public interface MassiveParameterizedCodec extends ParameterizedCodec, MassiveCodec {
/**
* Decode a massive value as specified {@link ParameterizedType}.
diff --git a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/ParametrizedCodec.java b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/ParameterizedCodec.java
similarity index 97%
rename from r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/ParametrizedCodec.java
rename to r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/ParameterizedCodec.java
index 2950b08bb..3326b4742 100644
--- a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/ParametrizedCodec.java
+++ b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/ParameterizedCodec.java
@@ -29,7 +29,7 @@
*
* @param the type without parameter that is handled by this codec.
*/
-public interface ParametrizedCodec extends Codec {
+public interface ParameterizedCodec extends Codec {
/**
* Decodes a {@link ByteBuf} as specified {@link ParameterizedType}.
diff --git a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/SetCodec.java b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/SetCodec.java
index a4ce64e06..82d4f8b2e 100644
--- a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/SetCodec.java
+++ b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/SetCodec.java
@@ -41,7 +41,7 @@
* Codec for {@link Set}{@code <}{@link String}{@code >}, {@link Set}{@code <}{@link Enum}{@code >} and the
* {@link String}{@code []}.
*/
-final class SetCodec implements ParametrizedCodec {
+final class SetCodec implements ParameterizedCodec {
static final SetCodec INSTANCE = new SetCodec();
diff --git a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/ZonedDateTimeCodec.java b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/ZonedDateTimeCodec.java
index 9af4aaa61..fedad10d8 100644
--- a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/ZonedDateTimeCodec.java
+++ b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/ZonedDateTimeCodec.java
@@ -37,7 +37,7 @@
*
* For now, supports only A.D. calendar in {@link ChronoZonedDateTime}.
*/
-final class ZonedDateTimeCodec implements ParametrizedCodec {
+final class ZonedDateTimeCodec implements ParameterizedCodec {
static final ZonedDateTimeCodec INSTANCE = new ZonedDateTimeCodec();
diff --git a/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/MySqlSimpleConnectionTest.java b/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/MySqlSimpleConnectionTest.java
index 9a21c84d6..c8d50c633 100644
--- a/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/MySqlSimpleConnectionTest.java
+++ b/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/MySqlSimpleConnectionTest.java
@@ -78,28 +78,28 @@ void createStatement() {
assertThat(noPrepare.createStatement(condition))
.isExactlyInstanceOf(TextSimpleStatement.class);
assertThat(noPrepare.createStatement("SELECT * FROM test WHERE id=?"))
- .isExactlyInstanceOf(TextParametrizedStatement.class);
+ .isExactlyInstanceOf(TextParameterizedStatement.class);
assertThat(allPrepare.createStatement("SELECT * FROM test WHERE id=1"))
.isExactlyInstanceOf(PrepareSimpleStatement.class);
assertThat(allPrepare.createStatement(condition))
.isExactlyInstanceOf(PrepareSimpleStatement.class);
assertThat(allPrepare.createStatement("SELECT * FROM test WHERE id=?"))
- .isExactlyInstanceOf(PrepareParametrizedStatement.class);
+ .isExactlyInstanceOf(PrepareParameterizedStatement.class);
assertThat(halfPrepare.createStatement("SELECT * FROM test WHERE id=1"))
.isExactlyInstanceOf(TextSimpleStatement.class);
assertThat(halfPrepare.createStatement(condition))
.isExactlyInstanceOf(TextSimpleStatement.class);
assertThat(halfPrepare.createStatement("SELECT * FROM test WHERE id=?"))
- .isExactlyInstanceOf(PrepareParametrizedStatement.class);
+ .isExactlyInstanceOf(PrepareParameterizedStatement.class);
assertThat(conditionPrepare.createStatement("SELECT * FROM test WHERE id=1"))
.isExactlyInstanceOf(TextSimpleStatement.class);
assertThat(conditionPrepare.createStatement(condition))
.isExactlyInstanceOf(PrepareSimpleStatement.class);
assertThat(conditionPrepare.createStatement("SELECT * FROM test WHERE id=?"))
- .isExactlyInstanceOf(PrepareParametrizedStatement.class);
+ .isExactlyInstanceOf(PrepareParameterizedStatement.class);
}
@SuppressWarnings("ConstantConditions")
diff --git a/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/PrepareParametrizedStatementTest.java b/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/PrepareParameterizedStatementTest.java
similarity index 70%
rename from r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/PrepareParametrizedStatementTest.java
rename to r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/PrepareParameterizedStatementTest.java
index f49d476e0..345704af5 100644
--- a/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/PrepareParametrizedStatementTest.java
+++ b/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/PrepareParameterizedStatementTest.java
@@ -26,30 +26,30 @@
import static org.mockito.Mockito.when;
/**
- * Unit tests for {@link PrepareParametrizedStatement}.
+ * Unit tests for {@link PrepareParameterizedStatement}.
*/
-class PrepareParametrizedStatementTest implements StatementTestSupport {
+class PrepareParameterizedStatementTest implements StatementTestSupport {
private final Codecs codecs = Codecs.builder().build();
- private final Field fetchSize = PrepareParametrizedStatement.class.getDeclaredField("fetchSize");
+ private final Field fetchSize = PrepareParameterizedStatement.class.getDeclaredField("fetchSize");
- PrepareParametrizedStatementTest() throws NoSuchFieldException {
+ PrepareParameterizedStatementTest() throws NoSuchFieldException {
fetchSize.setAccessible(true);
}
@Override
- public int getFetchSize(PrepareParametrizedStatement statement) throws IllegalAccessException {
+ public int getFetchSize(PrepareParameterizedStatement statement) throws IllegalAccessException {
return fetchSize.getInt(statement);
}
@Override
- public PrepareParametrizedStatement makeInstance(boolean isMariaDB, String sql, String ignored) {
+ public PrepareParameterizedStatement makeInstance(boolean isMariaDB, String sql, String ignored) {
Client client = mock(Client.class);
when(client.getContext()).thenReturn(ConnectionContextTest.mock(isMariaDB));
- return new PrepareParametrizedStatement(
+ return new PrepareParameterizedStatement(
client,
codecs,
Query.parse(sql),
diff --git a/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/PrepareQueryIntegrationTest.java b/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/PrepareQueryIntegrationTest.java
index 3d53c2965..855e8d3a9 100644
--- a/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/PrepareQueryIntegrationTest.java
+++ b/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/PrepareQueryIntegrationTest.java
@@ -24,7 +24,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
- * Integration tests for {@link PrepareParametrizedStatement} and {@link PrepareSimpleStatement}.
+ * Integration tests for {@link PrepareParameterizedStatement} and {@link PrepareSimpleStatement}.
*/
class PrepareQueryIntegrationTest extends QueryIntegrationTestSupport {
diff --git a/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/StatementTestSupport.java b/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/StatementTestSupport.java
index 0cab3c695..ebe788ed9 100644
--- a/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/StatementTestSupport.java
+++ b/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/StatementTestSupport.java
@@ -32,11 +32,11 @@
*/
interface StatementTestSupport {
- String PARAMETRIZED = "SELECT * FROM test WHERE id = ?id AND name = ?";
+ String PARAMETERIZED = "SELECT * FROM test WHERE id = ?id AND name = ?";
String SIMPLE = "SELECT * FROM test WHERE id = 1 AND name = 'Mirrors'";
- T makeInstance(boolean isMariaDB, String parametrizedSql, String simpleSql);
+ T makeInstance(boolean isMariaDB, String parameterizedSql, String simpleSql);
boolean supportsBinding();
@@ -48,7 +48,7 @@ default int getFetchSize(T statement) throws IllegalAccessException {
default void bind() {
assertTrue(supportsBinding(), "Must skip test case #bind() for simple statements");
- T statement = makeInstance(false, PARAMETRIZED, SIMPLE);
+ T statement = makeInstance(false, PARAMETERIZED, SIMPLE);
statement.bind(0, 1);
statement.bind("id", 1);
statement.bind(1, 1);
@@ -57,7 +57,7 @@ default void bind() {
@SuppressWarnings("ConstantConditions")
@Test
default void badBind() {
- T statement = makeInstance(false, PARAMETRIZED, SIMPLE);
+ T statement = makeInstance(false, PARAMETERIZED, SIMPLE);
if (supportsBinding()) {
assertThrows(IllegalArgumentException.class, () -> statement.bind(0, null));
@@ -89,7 +89,7 @@ default void badBind() {
default void bindNull() {
assertTrue(supportsBinding(), "Must skip test case #bindNull() for simple statements");
- T statement = makeInstance(false, PARAMETRIZED, SIMPLE);
+ T statement = makeInstance(false, PARAMETERIZED, SIMPLE);
statement.bindNull(0, Integer.class);
statement.bindNull("id", Integer.class);
statement.bindNull(1, Integer.class);
@@ -98,7 +98,7 @@ default void bindNull() {
@SuppressWarnings("ConstantConditions")
@Test
default void badBindNull() {
- T statement = makeInstance(false, PARAMETRIZED, SIMPLE);
+ T statement = makeInstance(false, PARAMETERIZED, SIMPLE);
if (supportsBinding()) {
assertThrows(IllegalArgumentException.class, () -> statement.bindNull(0, null));
@@ -128,7 +128,7 @@ default void badBindNull() {
@Test
default void add() {
- T statement = makeInstance(false, PARAMETRIZED, SIMPLE);
+ T statement = makeInstance(false, PARAMETERIZED, SIMPLE);
if (!supportsBinding()) {
statement.add();
@@ -146,14 +146,14 @@ default void add() {
default void badAdd() {
assertTrue(supportsBinding(), "Must skip test case #badAdd() for simple statements");
- T statement = makeInstance(false, PARAMETRIZED, SIMPLE);
+ T statement = makeInstance(false, PARAMETERIZED, SIMPLE);
statement.bind(0, 1);
assertThrows(IllegalStateException.class, statement::add);
}
@Test
default void mySqlReturnGeneratedValues() {
- T s = makeInstance(false, PARAMETRIZED, SIMPLE);
+ T s = makeInstance(false, PARAMETERIZED, SIMPLE);
s.returnGeneratedValues();
@@ -173,7 +173,7 @@ default void mySqlReturnGeneratedValues() {
@Test
default void mariaDbReturnGeneratedValues() {
- T s = makeInstance(true, PARAMETRIZED, SIMPLE);
+ T s = makeInstance(true, PARAMETERIZED, SIMPLE);
s.returnGeneratedValues();
@@ -203,7 +203,7 @@ default void mariaDbReturnGeneratedValues() {
@SuppressWarnings("ConstantConditions")
@Test
default void badReturnGeneratedValues() {
- T s = makeInstance(false, PARAMETRIZED, SIMPLE);
+ T s = makeInstance(false, PARAMETERIZED, SIMPLE);
assertThatIllegalArgumentException().isThrownBy(() -> s.returnGeneratedValues((String) null));
assertThatIllegalArgumentException().isThrownBy(() -> s.returnGeneratedValues((String[]) null));
@@ -215,7 +215,7 @@ default void badReturnGeneratedValues() {
@SuppressWarnings("ConstantConditions")
@Test
default void mariaDbBadReturnGeneratedValues() {
- T s = makeInstance(true, PARAMETRIZED, SIMPLE);
+ T s = makeInstance(true, PARAMETERIZED, SIMPLE);
assertThatIllegalArgumentException().isThrownBy(() -> s.returnGeneratedValues((String) null));
assertThatIllegalArgumentException().isThrownBy(() -> s.returnGeneratedValues((String[]) null));
@@ -229,7 +229,7 @@ default void mariaDbBadReturnGeneratedValues() {
@Test
default void fetchSize() throws IllegalAccessException {
- T statement = makeInstance(false, PARAMETRIZED, SIMPLE);
+ T statement = makeInstance(false, PARAMETERIZED, SIMPLE);
assertEquals(0, getFetchSize(statement), "Must skip test case #fetchSize() for text-based queries");
for (int i = 1; i <= 10; ++i) {
@@ -247,7 +247,7 @@ default void fetchSize() throws IllegalAccessException {
@Test
default void badFetchSize() {
- T statement = makeInstance(false, PARAMETRIZED, SIMPLE);
+ T statement = makeInstance(false, PARAMETERIZED, SIMPLE);
assertThrows(IllegalArgumentException.class, () -> statement.fetchSize(-1));
assertThrows(IllegalArgumentException.class, () -> statement.fetchSize(-10));
diff --git a/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/TextParametrizedStatementTest.java b/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/TextParameterizedStatementTest.java
similarity index 80%
rename from r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/TextParametrizedStatementTest.java
rename to r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/TextParameterizedStatementTest.java
index 1175fe5db..fb58ea526 100644
--- a/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/TextParametrizedStatementTest.java
+++ b/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/TextParameterizedStatementTest.java
@@ -23,9 +23,9 @@
import static org.mockito.Mockito.when;
/**
- * Unit tests for {@link TextParametrizedStatement}.
+ * Unit tests for {@link TextParameterizedStatement}.
*/
-class TextParametrizedStatementTest implements StatementTestSupport {
+class TextParameterizedStatementTest implements StatementTestSupport {
private final Codecs codecs = Codecs.builder().build();
@@ -35,12 +35,12 @@ public void fetchSize() {
}
@Override
- public TextParametrizedStatement makeInstance(boolean isMariaDB, String sql, String ignored) {
+ public TextParameterizedStatement makeInstance(boolean isMariaDB, String sql, String ignored) {
Client client = mock(Client.class);
when(client.getContext()).thenReturn(ConnectionContextTest.mock(isMariaDB));
- return new TextParametrizedStatement(
+ return new TextParameterizedStatement(
client,
codecs,
Query.parse(sql)
diff --git a/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/TextQueryIntegrationTest.java b/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/TextQueryIntegrationTest.java
index 76f3b95c6..b3e7478af 100644
--- a/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/TextQueryIntegrationTest.java
+++ b/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/TextQueryIntegrationTest.java
@@ -17,7 +17,7 @@
package io.asyncer.r2dbc.mysql;
/**
- * Integration tests for {@link TextSimpleStatement} and {@link TextParametrizedStatement}.
+ * Integration tests for {@link TextSimpleStatement} and {@link TextParameterizedStatement}.
*/
class TextQueryIntegrationTest extends QueryIntegrationTestSupport {
diff --git a/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/json/JacksonCodec.java b/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/json/JacksonCodec.java
index 9954721d2..ec9127cc7 100644
--- a/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/json/JacksonCodec.java
+++ b/r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/json/JacksonCodec.java
@@ -21,8 +21,7 @@
import io.asyncer.r2dbc.mysql.ParameterWriter;
import io.asyncer.r2dbc.mysql.api.MySqlReadableMetadata;
import io.asyncer.r2dbc.mysql.codec.CodecContext;
-import io.asyncer.r2dbc.mysql.codec.ParametrizedCodec;
-import io.asyncer.r2dbc.mysql.collation.CharCollation;
+import io.asyncer.r2dbc.mysql.codec.ParameterizedCodec;
import io.asyncer.r2dbc.mysql.constant.MySqlType;
import io.asyncer.r2dbc.mysql.internal.util.VarIntUtils;
import io.netty.buffer.ByteBuf;
@@ -42,7 +41,7 @@
/**
* A JSON codec based on Jackson.
*/
-public final class JacksonCodec implements ParametrizedCodec