Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import io.vertx.sqlclient.data.Numeric;
import io.vertx.sqlclient.impl.RowBase;

import java.math.BigDecimal;
import java.time.*;
import java.time.temporal.Temporal;
import java.util.List;
Expand Down Expand Up @@ -50,6 +51,8 @@ public <T> T get(Class<T> type, int position) {
return type.cast(getFloat(position));
} else if (type == Double.class) {
return type.cast(getDouble(position));
} else if (type == BigDecimal.class) {
return type.cast(getBigDecimal(position));
} else if (type == Numeric.class) {
return type.cast(getNumeric(position));
} else if (type == String.class) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public void testBinaryEncodeBigDecimal(TestContext ctx) {
ctx.assertEquals(999999999L, row.getLong(columnName));
ctx.assertEquals(BigDecimal.valueOf(999999999L), row.getBigDecimal(columnName));
ctx.assertEquals(BigDecimal.valueOf(999999999L), row.getBigDecimal(columnName));
ctx.assertEquals(BigDecimal.valueOf(999999999L), row.get(BigDecimal.class, columnName));
ctx.assertEquals(BigDecimal.valueOf(999999999L), row.get(BigDecimal.class, columnName));
ctx.assertEquals(Numeric.parse("999999999"), row.getValue(0));
ctx.assertEquals(Numeric.parse("999999999"), row.getValue(columnName));
});
Expand Down