From: | Oliver Jowett <oliver(at)opencloud(dot)com> |
---|---|
To: | Dave Cramer <pg(at)fastcrypt(dot)com> |
Cc: | List <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: jdbc cts final diff for review |
Date: | 2005-06-29 22:24:06 |
Message-ID: | 42C31F86.8050205@opencloud.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Jowett | 2005-06-29 22:25:13 | Re: XA support |
Previous Message | Oliver Jowett | 2005-06-29 22:19:00 | Re: XA support |