Array helper patch

Поиск
Список
Период
Сортировка
От John Lister
Тема Array helper patch
Дата
Msg-id 4F19C14A.2030704@kickstone.com
обсуждение исходный текст
Список pgsql-jdbc
When using a JPA provider such as EclipseLink, it is useful to be able
to pass an array of values as a parameter, but they don't easily expose
the raw Connection object in order to use createArrayOf to create a JDBC
array. I've therefore attached a simple patch that modifies JDBC4
statements to accept arrays of primitive objects (and their object form
variants). Patched against latest cvs version.

Hopefully fairly obvious what it does, if an array is passed to
setObject then it looks up the base type (rejecting mixed type arrays)
and calls createArrayOf with the corresponding type. If an array of
primitive types is passed, it converts these to their object form first.
None primitive based types are rejected as well.

Thanks and comments

John

--
www.pricegoblin.co.uk


Вложения

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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: plpgsql function, comment with single quote, braces
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: test git conversion