Skip to content
Snippets Groups Projects
Commit 86b4815e authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Added support for arraysize '*'

parent 5fa3dcd1
Branches adql2.1-ia2
No related tags found
No related merge requests found
......@@ -1384,8 +1384,21 @@ public class JDBCConnection implements DBConnection {
ucd = rs.getString(5), utype = rs.getString(6),
datatype = rs.getString(7),
dbName = (hasDBName ? (hasColumnIndex ? rs.getString(13) : rs.getString(12)) : null);
int size = rs.getInt(8),
colIndex = (hasColumnIndex ? (rs.getObject(12) == null ? -1 : rs.getInt(12)) : -1);
int size = 0;
if(hasArraysize) {
String arraySize = rs.getString(8);
if(!rs.wasNull()) {
arraySize = arraySize.replace("*", "");
if(arraySize.isEmpty()) {
size = Integer.MAX_VALUE;
} else {
size = Integer.parseInt(arraySize);
}
}
} else {
size = rs.getInt(8);
}
int colIndex = (hasColumnIndex ? (rs.getObject(12) == null ? -1 : rs.getInt(12)) : -1);
boolean principal = toBoolean(rs.getObject(9)),
indexed = toBoolean(rs.getObject(10)),
std = toBoolean(rs.getObject(11));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment