Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
DBZ-7752 Small change in naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Naros committed May 2, 2024
1 parent 3b3c89f commit 994c861
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void bind(ValueBindDescriptor valueBindDescriptor) {
if (valueBindDescriptor.getTargetSqlType() != null) {
if (valueBindDescriptor.getTargetSqlType() == Types.ARRAY) {
Collection<Object> collection = (Collection<Object>) valueBindDescriptor.getValue();
Array array = binder.getConnection().createArrayOf(valueBindDescriptor.getSubTypeName(), collection.toArray());
Array array = binder.getConnection().createArrayOf(valueBindDescriptor.getElementTypeName(), collection.toArray());
binder.setArray(valueBindDescriptor.getIndex(), array);
}
else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@ public class ValueBindDescriptor {

private final Integer targetSqlType;

private final String subTypeName;
private final String elementTypeName;

public ValueBindDescriptor(int index, Object value) {
this.index = index;
this.value = value;
this.targetSqlType = null;
this.subTypeName = null;
this.elementTypeName = null;
}

public ValueBindDescriptor(int index, Object value, Integer targetSqlType) {
this.index = index;
this.value = value;
this.targetSqlType = targetSqlType;
this.subTypeName = null;
this.elementTypeName = null;
}

public ValueBindDescriptor(int index, Object value, Integer targetSqlType, String subTypeName) {
public ValueBindDescriptor(int index, Object value, Integer targetSqlType, String elementTypeName) {
this.index = index;
this.value = value;
this.targetSqlType = targetSqlType;
this.subTypeName = subTypeName;
this.elementTypeName = elementTypeName;
}

public int getIndex() {
Expand All @@ -47,7 +47,7 @@ public Integer getTargetSqlType() {
return targetSqlType;
}

public String getSubTypeName() {
return subTypeName;
public String getElementTypeName() {
return elementTypeName;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public String[] getRegistrationKeys() {

@Override
public String getTypeName(DatabaseDialect dialect, Schema schema, boolean key) {
Type subType = dialect.getSchemaType(schema.valueSchema());
typeName = subType.getTypeName(dialect, schema.valueSchema(), key);
Type elementType = dialect.getSchemaType(schema.valueSchema());
typeName = elementType.getTypeName(dialect, schema.valueSchema(), key);
return typeName + "[]";
}

Expand Down

0 comments on commit 994c861

Please sign in to comment.