Re: AbstractJdbc2Array - another patch

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: AbstractJdbc2Array - another patch
Дата
Msg-id Pine.BSO.4.64.0711240055520.505@leary.csoft.net
обсуждение исходный текст
Ответ на Re: AbstractJdbc2Array - another patch  (Marek Lewczuk <newsy@lewczuk.com>)
Ответы Re: AbstractJdbc2Array - another patch  (Marek Lewczuk <newsy@lewczuk.com>)
Список pgsql-jdbc

On Thu, 22 Nov 2007, Marek Lewczuk wrote:

> Well, I aware that java.lang.reflect.Array#newInstance can be used
> however I didn't know for what versions of JDK reflect package can be used -
> if you have mentioned about it so I guess that I can - in the attachment you
> can find AbstractJdbc2Array patch - please review it.

Doesn't seem to work.  The attached case fails in two different ways
depending on whether compatible is set or not.  The JDK methods you can
use depends on where the code you are adding goes.  In this case you're
adding code to a JDBC2 class, so you are restricted to JDK1.2 code.  JDBC3
-> 1.4, JDBC3g -> 1.5, JDBC4 -> 1.6.

> I one to discuss one more thing - see below lines in the AbstractJdb2Array:
> this.useObjects = connection.haveMinimumCompatibleVersion("8.3");
> this.haveMinServer82 = connection.haveMinimumServerVersion("8.2");
>
> We must clarify, when to use objects instead of primitive types ? Can you
> describe it ?
>

Right now you use objects if either dims > 1 or useObjects.  I'm
suggesting that we should only use objects if useObjects.  That way people
who want to get int[][] returned can get that via setting compatible=8.2.

Kris Jurka

Вложения

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

Предыдущее
От: Luc1fer Hell
Дата:
Сообщение: Fw: java.lang.IndexOutOfBoundsException when commit long transaction
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: Fw: java.lang.IndexOutOfBoundsException when commit long transaction