Re: jdbc cts final diff for review

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: jdbc cts final diff for review
Дата
Msg-id 42C31F86.8050205@opencloud.com
обсуждение исходный текст
Ответ на Re: jdbc cts final diff for review  (Dave Cramer <pg@fastcrypt.com>)
Ответы Re: jdbc cts final diff for review  (Dave Cramer <pg@fastcrypt.com>)
Список pgsql-jdbc
Dave Cramer wrote:

>> You seem to have reverted your earlier changes and put back the
>> types/* classes -- why?
>
> huh ? they should be in there in HEAD, I did remove the creation of an
> object, and went to static methods

HEAD went through this progression:

(1) no types/*
(2) you added types/PGByte, etc
(3) you removed types/* and added static methods

Your patch does things like this:

> --- 1500,1520 ----
>           preparedParameters.clear();
>       }
>
> !     private PGType createInternalType( Object x, int targetType ) throws PSQLException
>       {
> !         if ( x instanceof Byte ) return PGByte.castToServerType((Byte)x, targetType );
> !         if ( x instanceof Short ) return PGShort.castToServerType((Short)x, targetType );
> !         if ( x instanceof Integer ) return PGInteger.castToServerType((Integer)x, targetType );
> !         if ( x instanceof Long ) return PGLong.castToServerType((Long)x, targetType );
> !         if ( x instanceof Double ) return PGDouble.castToServerType((Double)x, targetType );
> !         if ( x instanceof Float ) return PGFloat.castToServerType((Float)x, targetType );
> !         if ( x instanceof BigDecimal) return PGBigDecimal.castToServerType((BigDecimal)x, targetType );
> !         // since all of the above are instances of Number make sure this is after them
> !         if ( x instanceof Number ) return PGNumber.castToServerType((Number)x, targetType );
> !         if ( x instanceof Boolean) return PGBoolean.castToServerType((Boolean)x, targetType );
> !         return new PGUnknown(x);
>
> +     }
>       // Helper method for setting parameters to PGobject subclasses.
>       private void setPGobject(int parameterIndex, PGobject x) throws SQLException {
>           String typename = x.getType();

which seems to be reverting back to step (2)

I'm guessing you forgot to apply the changes in (3) to your working copy
of the driver, then diffed against current HEAD..

-O

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

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: XA support
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: XA support