Skip to content
Merged
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 @@ -61,14 +61,17 @@ public Object decode(Object data) {
return toFloat(data);
}

private static final String PG_OBJECT_CLASS = "org.postgresql.util.PGobject";
private static final String R2DBC_PG_OBJECT_CLASS = "io.r2dbc.postgresql.codec.Vector";

private Float[] toFloat(Object data) {
if (data == null) {
return null;
}
if (data instanceof Vector vector) {
if (R2DBC_PG_OBJECT_CLASS.equals(data.getClass().getName()) && data instanceof Vector vector) {
return toFloatArray(vector.getVector());
}
if (data instanceof PGobject vector) {
if (PG_OBJECT_CLASS.equals(data.getClass().getName()) && data instanceof PGobject vector) {
return toFloatArray(vector.getValue());
}
return toFloatArray(data);
Expand Down
Loading