Fix setObject() with java.sql.Types.Date/Time/Timestamp

Поиск
Список
Период
Сортировка
От Kim Ho
Тема Fix setObject() with java.sql.Types.Date/Time/Timestamp
Дата
Msg-id 1056055946.19807.131.camel@topanga.toronto.redhat.com
обсуждение исходный текст
Список pgsql-jdbc
Problem:
 - Error if user attempts to call:
1. setObject(x,y,java.sql.types.Timestamp) if y is a Date
2. setObject(x,y,java.sql.types.Time) if y is a Timestamp
3. setObject(x,y,java.sql.types.Date) if y is a Timestamp
4. setObject(x,y,java.sql.types.Date/Timestamp/Time) if y is a string
with valid date/timestamp/time format

1 - 3 are causing failures in the JDBC CTS.

Fix:
1. adds 00:00:00.0 as time portion of timestamp
2. substring() to remove date
3. substring() to remove time
4. check for instance of java.sql.types.date/time/timestamp and use
valueOf if necessary


Cheers,

Kim

Вложения

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kim Ho
Дата:
Сообщение: Allow setObject(x,y,Types.INTEGER) if y is Boolean & added Boolean to SQL Keywords
Следующее
От: Kim Ho
Дата:
Сообщение: Add checking in setMaxRows, setQueryTimeout, and setFetchSize