Re: Regarding useObjects

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: Regarding useObjects
Дата
Msg-id CADK3HH+9O5=Y4RSCxCCBaewGPWBQ3zzTjqD0DoZJuD9wCc73uQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Regarding useObjects  (Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com>)
Ответы Re: Regarding useObjects
Re: Regarding useObjects
Список pgsql-jdbc


On Wed, 27 Sept 2023 at 05:00, Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com> wrote:
Good Day Vladimir

On 9/27/23 09:03, Vladimir Sitnikov wrote:
>> so there was the option to change this to false and recompile
> We try doing our best to keep backward compatibility both
> compilation-wise and behaviour-wise.
> However, we treat "private fields and methods" as private, and we do
> not expect people would depend on them.
> If you have to modify sources or depend on private APIs I would
> suggest raising an issue or PR so it could be incorporated
> into the driver itself.
>
> Would you please provide a test case of what you are doing with PgArray?
> What is exactly the sequence of JDBC calls, the actual and the
> expected outcomes in your case?

E.g. for the case of floats, we have to change all:

java.sql.Array arr = rs.getArray(1);

Object objarr = arr.getArray();

float flarr[] = (float[]) objarr;

to

java.sql.Array arr = rs.getArray(1);

Object objarr = arr.getArray();

Float flarr[] = (Float[]) objarr;


So the problem with using float instead of Float is that it is impossible to have a null float and arrays can have nulls.

Dave 

>
> The mentioned "useObjects" has been removed in
> https://github.com/pgjdbc/pgjdbc/pull/1194 (Refactor decoding arrays)
>
> Vladimir


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

Предыдущее
От: Achilleas Mantzios - cloud
Дата:
Сообщение: Re: Regarding useObjects
Следующее
От: Vladimir Sitnikov
Дата:
Сообщение: Re: Regarding useObjects