Skip to content
Snippets Groups Projects
Commit 68666ccb authored by gmantele's avatar gmantele
Browse files

[TAP] Follow up of the previous commit with BOOLEAN datatypes:

c5cba4ba. The cast into a Short object is
absolutely required for the FITS format.
parent c5cba4ba
No related branches found
No related tags found
No related merge requests found
......@@ -708,7 +708,7 @@ public class ResultSetTableIterator implements TableIterator {
colValue = ISO8601Format.format(((Timestamp)colValue).getTime());
// if the column value is a Boolean object, format it as a SMALLINT:
else if (colValue instanceof Boolean)
colValue = ((Boolean)colValue) ? 1 : 0;
colValue = ((Boolean)colValue) ? (short)1 : (short)0;
// if the column should be only a character:
else if (colType != null && colValue != null && colType.type == DBDatatype.CHAR && (colType.length == 1 || colType.length <= 0) && colValue instanceof String)
colValue = ((String)colValue).charAt(0);
......
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