Skip to content

Commit 3f7862a

Browse files
committed
Various cleanups/renames
1 parent 9eb2efd commit 3f7862a

File tree

67 files changed

+251
-256
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+251
-256
lines changed

vertx-db2-client/src/main/java/io/vertx/db2client/impl/DB2RowImpl.java renamed to vertx-db2-client/src/main/java/io/vertx/db2client/impl/DB2Row.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,18 @@
2323
import java.time.OffsetDateTime;
2424
import java.time.OffsetTime;
2525
import java.time.temporal.Temporal;
26-
import java.util.List;
2726
import java.util.UUID;
2827

2928
import io.vertx.core.buffer.Buffer;
3029
import io.vertx.db2client.impl.drda.DB2RowId;
3130
import io.vertx.sqlclient.data.Numeric;
3231
import io.vertx.sqlclient.impl.RowBase;
33-
import io.vertx.sqlclient.internal.RowDesc;
32+
import io.vertx.sqlclient.internal.RowDescriptor;
3433

35-
public class DB2RowImpl extends RowBase {
34+
public class DB2Row extends RowBase {
3635

37-
public DB2RowImpl(RowDesc rowDesc) {
38-
super(rowDesc);
36+
public DB2Row(RowDescriptor rowDescriptor) {
37+
super(rowDescriptor);
3938
}
4039

4140
@Override

vertx-db2-client/src/main/java/io/vertx/db2client/impl/codec/DB2ParamDesc.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import io.vertx.db2client.impl.drda.ColumnMetaData;
2222
import io.vertx.sqlclient.data.Numeric;
2323
import io.vertx.sqlclient.impl.ErrorMessageFactory;
24-
import io.vertx.sqlclient.internal.TupleInternal;
24+
import io.vertx.sqlclient.internal.TupleBase;
2525

2626
class DB2ParamDesc {
2727

@@ -35,7 +35,7 @@ ColumnMetaData paramDefinitions() {
3535
return paramDefinitions;
3636
}
3737

38-
public TupleInternal prepare(TupleInternal values) {
38+
public TupleBase prepare(TupleBase values) {
3939
if (values.size() != paramDefinitions.columns_) {
4040
throw new VertxException(ErrorMessageFactory.buildWhenArgumentsLengthNotMatched(paramDefinitions.columns_, values.size()), true);
4141
}

vertx-db2-client/src/main/java/io/vertx/db2client/impl/codec/DB2PreparedStatement.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@
2424
import io.vertx.db2client.impl.drda.Cursor;
2525
import io.vertx.db2client.impl.drda.Section;
2626
import io.vertx.sqlclient.internal.PreparedStatement;
27-
import io.vertx.sqlclient.internal.RowDesc;
28-
import io.vertx.sqlclient.internal.TupleInternal;
27+
import io.vertx.sqlclient.internal.RowDescriptor;
28+
import io.vertx.sqlclient.internal.TupleBase;
2929

3030
public class DB2PreparedStatement implements PreparedStatement {
3131

3232
private static final Logger LOG = LoggerFactory.getLogger(DB2PreparedStatement.class);
3333

3434
final String sql;
3535
final DB2ParamDesc paramDesc;
36-
final DB2RowDesc rowDesc;
36+
final DB2RowDescriptor rowDesc;
3737
final Section section;
3838

3939
private final Map<String, QueryInstance> activeQueries = new ConcurrentHashMap<>(4);
@@ -50,15 +50,15 @@ public static class QueryInstance {
5050
}
5151
}
5252

53-
DB2PreparedStatement(String sql, DB2ParamDesc paramDesc, DB2RowDesc rowDesc, Section section) {
53+
DB2PreparedStatement(String sql, DB2ParamDesc paramDesc, DB2RowDescriptor rowDesc, Section section) {
5454
this.paramDesc = paramDesc;
5555
this.rowDesc = rowDesc;
5656
this.sql = sql;
5757
this.section = section;
5858
}
5959

6060
@Override
61-
public RowDesc rowDesc() {
61+
public RowDescriptor rowDesc() {
6262
return rowDesc;
6363
}
6464

@@ -68,7 +68,7 @@ public String sql() {
6868
}
6969

7070
@Override
71-
public TupleInternal prepare(TupleInternal values) {
71+
public TupleBase prepare(TupleBase values) {
7272
return paramDesc.prepare(values);
7373
}
7474

vertx-db2-client/src/main/java/io/vertx/db2client/impl/codec/DB2RowDesc.java renamed to vertx-db2-client/src/main/java/io/vertx/db2client/impl/codec/DB2RowDescriptor.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616
package io.vertx.db2client.impl.codec;
1717

1818
import io.vertx.db2client.impl.drda.ColumnMetaData;
19-
import io.vertx.sqlclient.internal.RowDesc;
19+
import io.vertx.sqlclient.internal.RowDescriptor;
2020

2121
import java.sql.JDBCType;
2222
import java.util.List;
2323

24-
class DB2RowDesc extends RowDesc {
24+
class DB2RowDescriptor extends RowDescriptor {
2525

2626
private final ColumnMetaData columnMetaData;
2727

28-
private DB2RowDesc(DB2ColumnDesc[] columnDescs, ColumnMetaData columnMetaData) {
28+
private DB2RowDescriptor(DB2ColumnDesc[] columnDescs, ColumnMetaData columnMetaData) {
2929
super(columnDescs);
3030
this.columnMetaData = columnMetaData;
3131
}
@@ -34,13 +34,13 @@ ColumnMetaData columnDefinitions() {
3434
return columnMetaData;
3535
}
3636

37-
static DB2RowDesc create(ColumnMetaData md) {
37+
static DB2RowDescriptor create(ColumnMetaData md) {
3838
List<String> names = md.getColumnNames();
3939
List<JDBCType> types = md.getJdbcTypes();
4040
DB2ColumnDesc[] columns = new DB2ColumnDesc[names.size()];
4141
for (int i = 0; i < columns.length; i++) {
4242
columns[i] = new DB2ColumnDesc(names.get(i), types.get(i));
4343
}
44-
return new DB2RowDesc(columns, md);
44+
return new DB2RowDescriptor(columns, md);
4545
}
4646
}

vertx-db2-client/src/main/java/io/vertx/db2client/impl/codec/ExtendedBatchQueryCommandCodec.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@
2727
import io.vertx.db2client.impl.drda.DRDAQueryRequest;
2828
import io.vertx.db2client.impl.drda.DRDAQueryResponse;
2929
import io.vertx.sqlclient.Tuple;
30-
import io.vertx.sqlclient.internal.TupleInternal;
30+
import io.vertx.sqlclient.internal.TupleBase;
3131
import io.vertx.sqlclient.codec.CommandResponse;
3232
import io.vertx.sqlclient.spi.protocol.ExtendedQueryCommand;
3333

3434
public class ExtendedBatchQueryCommandCodec<R> extends ExtendedQueryCommandBaseCodec<R, ExtendedQueryCommand<R>> {
3535

3636
private static final Logger LOG = LoggerFactory.getLogger(ExtendedBatchQueryCommandCodec.class);
3737

38-
private final List<TupleInternal> params;
38+
private final List<TupleBase> params;
3939
private final List<QueryInstance> queryInstances;
4040
private final String baseCursorId;
4141

vertx-db2-client/src/main/java/io/vertx/db2client/impl/codec/ExtendedQueryCommandBaseCodec.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ RowResultDecoder<?, R> decodePreparedQuery(ByteBuf payload, DRDAQueryResponse re
7272
if (queryInstance.cursor == null) {
7373
resp.setOutputColumnMetaData(columnDefinitions);
7474
resp.readBeginOpenQuery();
75-
decoder = new RowResultDecoder<>(cmd.collector(), DB2RowDesc.create(columnDefinitions), resp.getCursor(), resp);
75+
decoder = new RowResultDecoder<>(cmd.collector(), DB2RowDescriptor.create(columnDefinitions), resp.getCursor(), resp);
7676
queryInstance.cursor = resp.getCursor();
7777
queryInstance.queryInstanceId = resp.getQueryInstanceId();
7878
} else {

vertx-db2-client/src/main/java/io/vertx/db2client/impl/codec/PrepareStatementCodec.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ void decodePayload(ByteBuf payload, int payloadLength) {
8989

9090
private void handleReadyForQuery() {
9191
completionHandler.handle(CommandResponse.success(new DB2PreparedStatement(cmd.sql(), new DB2ParamDesc(paramDesc),
92-
DB2RowDesc.create(rowDesc), section)));
92+
DB2RowDescriptor.create(rowDesc), section)));
9393
}
9494

9595
private void resetIntermediaryResult() {

vertx-db2-client/src/main/java/io/vertx/db2client/impl/codec/QueryCommandBaseCodec.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import io.netty.buffer.ByteBuf;
1919
import io.vertx.db2client.impl.drda.ColumnMetaData;
2020
import io.vertx.db2client.impl.drda.DRDAQueryRequest;
21-
import io.vertx.sqlclient.internal.RowDesc;
21+
import io.vertx.sqlclient.internal.RowDescriptor;
2222
import io.vertx.sqlclient.spi.protocol.QueryCommandBase;
2323

2424
abstract class QueryCommandBaseCodec<T, C extends QueryCommandBase<T>> extends CommandCodec<Boolean, C> {
@@ -79,11 +79,11 @@ void decodePayload(ByteBuf payload, int payloadLength) {
7979
void handleQueryResult(RowResultDecoder<?, T> decoder) {
8080
Throwable failure = decoder.complete();
8181
T result = decoder.result();
82-
RowDesc rowDesc = decoder.rowDesc;
82+
RowDescriptor rowDescriptor = decoder.rowDesc;
8383
int size = decoder.size();
8484
int updatedCount = decoder.size();
8585
decoder.reset();
86-
cmd.resultHandler().handleResult(updatedCount, size, rowDesc, result, failure);
86+
cmd.resultHandler().handleResult(updatedCount, size, rowDescriptor, result, failure);
8787
}
8888

8989
}

vertx-db2-client/src/main/java/io/vertx/db2client/impl/codec/RowResultDecoder.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import io.netty.buffer.ByteBuf;
2222
import io.vertx.core.internal.logging.Logger;
2323
import io.vertx.core.internal.logging.LoggerFactory;
24-
import io.vertx.db2client.impl.DB2RowImpl;
24+
import io.vertx.db2client.impl.DB2Row;
2525
import io.vertx.db2client.impl.drda.Cursor;
2626
import io.vertx.db2client.impl.drda.DRDAQueryResponse;
2727
import io.vertx.sqlclient.Row;
@@ -33,11 +33,11 @@ class RowResultDecoder<C, R> extends RowDecoder<C, R> {
3333

3434
private static final Logger LOG = LoggerFactory.getLogger(RowResultDecoder.class);
3535

36-
final DB2RowDesc rowDesc;
36+
final DB2RowDescriptor rowDesc;
3737
final Cursor cursor;
3838
final DRDAQueryResponse response;
3939

40-
RowResultDecoder(Collector<Row, C, R> collector, DB2RowDesc rowDesc, Cursor cursor, DRDAQueryResponse resp) {
40+
RowResultDecoder(Collector<Row, C, R> collector, DB2RowDescriptor rowDesc, Cursor cursor, DRDAQueryResponse resp) {
4141
super(collector);
4242
this.rowDesc = rowDesc;
4343
this.cursor = cursor;
@@ -55,7 +55,7 @@ public boolean next() {
5555

5656
@Override
5757
protected RowInternal row() {
58-
return new DB2RowImpl(rowDesc);
58+
return new DB2Row(rowDesc);
5959
}
6060

6161
@Override

vertx-db2-client/src/main/java/io/vertx/db2client/impl/codec/SimpleQueryCommandCodec.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void decodeQuery(ByteBuf payload) {
7575
resp.readPrepareDescribeOutput();
7676
resp.readBeginOpenQuery();
7777
columnDefinitions = resp.getOutputColumnMetaData();
78-
RowResultDecoder<?, T> decoder = new RowResultDecoder<>(cmd.collector(), DB2RowDesc.create(columnDefinitions), resp.getCursor(), resp);
78+
RowResultDecoder<?, T> decoder = new RowResultDecoder<>(cmd.collector(), DB2RowDescriptor.create(columnDefinitions), resp.getCursor(), resp);
7979

8080
while (decoder.next()) {
8181
decoder.handleRow(columnDefinitions.columns_, payload);

0 commit comments

Comments
 (0)