Skip to content

Commit 413b608

Browse files
committed
Fixes BigDecimal casting for the postgres client
1 parent ac1814a commit 413b608

File tree

1 file changed

+5
-0
lines changed
  • vertx-pg-client/src/main/java/io/vertx/pgclient/impl

1 file changed

+5
-0
lines changed

vertx-pg-client/src/main/java/io/vertx/pgclient/impl/RowImpl.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import io.vertx.sqlclient.internal.RowDesc;
2727

2828
import java.lang.reflect.Array;
29+
import java.math.BigDecimal;
2930
import java.time.*;
3031
import java.util.List;
3132
import java.util.UUID;
@@ -74,6 +75,8 @@ public <T> T get(Class<T> type, int position) {
7475
return type.cast(getArrayOfFloats(position));
7576
} else if (componentType == Double.class) {
7677
return type.cast(getArrayOfDoubles(position));
78+
} else if (type == BigDecimal.class) {
79+
return type.cast(getArrayOfBigDecimals(position));
7780
} else if (componentType == String.class) {
7881
return type.cast(getArrayOfStrings(position));
7982
} else if (componentType == Buffer.class) {
@@ -128,6 +131,8 @@ public <T> T get(Class<T> type, int position) {
128131
return type.cast(getFloat(position));
129132
} else if (type == Double.class) {
130133
return type.cast(getDouble(position));
134+
} else if (type == BigDecimal.class) {
135+
return type.cast(getBigDecimal(position));
131136
} else if (type == Numeric.class) {
132137
return type.cast(getNumeric(position));
133138
} else if (type == String.class) {

0 commit comments

Comments
 (0)