提交 b9764b5d 编写于 作者: S serge-rider

#3496 Date and Time jdbc parameters conversion fix


Former-commit-id: 2549f9cb
上级 c822daaf
......@@ -53,6 +53,23 @@ public class JDBCDateTimeValueHandler extends DateTimeCustomValueHandler {
super(formatterProfile);
}
@Override
public Object getValueFromObject(DBCSession session, DBSTypedObject type, Object object, boolean copy) throws DBCException {
Object value = super.getValueFromObject(session, type, object, copy);
if (value instanceof Date) {
switch (type.getTypeID()) {
case Types.TIME:
case Types.TIME_WITH_TIMEZONE:
return getTimeValue(value);
case Types.DATE:
return getDateValue(value);
default:
return getTimestampValue(value);
}
}
return value;
}
@Override
public Object fetchValueObject(@NotNull DBCSession session, @NotNull DBCResultSet resultSet, @NotNull DBSTypedObject type, int index) throws DBCException {
try {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册