Mercurial > hg > monetdb-java
comparison src/main/java/org/monetdb/jdbc/MonetResultSet.java @ 943:ff075ed5ce81
Spell check.
author | Sjoerd Mullender <sjoerd@acm.org> |
---|---|
date | Thu, 09 Jan 2025 10:56:14 +0100 (3 months ago) |
parents | d416e9b6b3d0 |
children | 32f246853ec4 |
comparison
equal
deleted
inserted
replaced
942:45c26b1a0677 | 943:ff075ed5ce81 |
---|---|
1171 } | 1171 } |
1172 lastReadWasNull = false; | 1172 lastReadWasNull = false; |
1173 return Integer.parseInt(val); | 1173 return Integer.parseInt(val); |
1174 } catch (NumberFormatException e) { | 1174 } catch (NumberFormatException e) { |
1175 // The oid datatype values (as string) have a @0 suffix in the string value. | 1175 // The oid datatype values (as string) have a @0 suffix in the string value. |
1176 // To allow succesful parsing and conversion to int, we need to remove the suffix first | 1176 // To allow successful parsing and conversion to int, we need to remove the suffix first |
1177 if ("oid".equals(types[columnIndex - 1])) { | 1177 if ("oid".equals(types[columnIndex - 1])) { |
1178 if (val.endsWith("@0")) { | 1178 if (val.endsWith("@0")) { |
1179 try { | 1179 try { |
1180 return Integer.parseInt(val.substring(0, val.length()-2)); | 1180 return Integer.parseInt(val.substring(0, val.length()-2)); |
1181 } catch (NumberFormatException nfe) { | 1181 } catch (NumberFormatException nfe) { |
1222 } | 1222 } |
1223 lastReadWasNull = false; | 1223 lastReadWasNull = false; |
1224 return Long.parseLong(val); | 1224 return Long.parseLong(val); |
1225 } catch (NumberFormatException e) { | 1225 } catch (NumberFormatException e) { |
1226 // The oid datatype values (as string) have a @0 suffix in the string value. | 1226 // The oid datatype values (as string) have a @0 suffix in the string value. |
1227 // To allow succesful parsing and conversion to long, we need to remove the suffix first | 1227 // To allow successful parsing and conversion to long, we need to remove the suffix first |
1228 if ("oid".equals(types[columnIndex - 1])) { | 1228 if ("oid".equals(types[columnIndex - 1])) { |
1229 if (val.endsWith("@0")) { | 1229 if (val.endsWith("@0")) { |
1230 try { | 1230 try { |
1231 return Long.parseLong(val.substring(0, val.length()-2)); | 1231 return Long.parseLong(val.substring(0, val.length()-2)); |
1232 } catch (NumberFormatException nfe) { | 1232 } catch (NumberFormatException nfe) { |
1995 private SimpleDateFormat timestampFormat; | 1995 private SimpleDateFormat timestampFormat; |
1996 /** | 1996 /** |
1997 * Helper method which parses the date/time value for columns of type | 1997 * Helper method which parses the date/time value for columns of type |
1998 * TIME, DATE and TIMESTAMP. For the types CHAR, VARCHAR and | 1998 * TIME, DATE and TIMESTAMP. For the types CHAR, VARCHAR and |
1999 * LONGVARCHAR an attempt is made to parse the date according to the | 1999 * LONGVARCHAR an attempt is made to parse the date according to the |
2000 * given type. The given Calender object is filled with the parsed | 2000 * given type. The given Calendar object is filled with the parsed |
2001 * data. Optional fractional seconds (nanos) are returned by this | 2001 * data. Optional fractional seconds (nanos) are returned by this |
2002 * method. If the underlying type of the column is none of the | 2002 * method. If the underlying type of the column is none of the |
2003 * mentioned six, January 1st 1970 0:00:00 GMT is returned.<br /> | 2003 * mentioned six, January 1st 1970 0:00:00 GMT is returned.<br /> |
2004 * The dates are parsed with the given Calendar. | 2004 * The dates are parsed with the given Calendar. |
2005 * | 2005 * |