Permalink
Browse files

fix: PgArray returning null for binary arrays

closes #504
  • Loading branch information...
vlsi committed Feb 7, 2016
1 parent 880244e commit b225535640b78c5e99c27f1991ab567c17fb6333
@@ -881,13 +881,26 @@ public ResultSet getResultSetImpl(long index, int count, Map<String, Class<?>> m
}
public String toString() {
if (fieldString == null) {
try {
Object array = readBinaryArray(1,0);
java.sql.Array tmpArray = connection.createArrayOf(getBaseTypeName(), (Object[]) array);
fieldString = tmpArray.toString();
} catch (SQLException e) {
fieldString = "NULL"; //punt
}
}
return fieldString;
}
/**
* Convert array list to PG String representation (e.g. {0,1,2}).
*/
private String toString(PgArrayList list) throws SQLException {
if (list == null) {
return "NULL";
}
StringBuilder b = new StringBuilder().append('{');
char delim = connection.getTypeInfo().getArrayDelimiter(oid);
Oops, something went wrong.

0 comments on commit b225535

Please sign in to comment.