Re: IN clauses via setObject(Collection) [Was: Re: Prepared Statements]
В списке pgsql-jdbc по дате отправления:
| От | Oliver Jowett |
|---|---|
| Тема | Re: IN clauses via setObject(Collection) [Was: Re: Prepared Statements] |
| Дата | |
| Msg-id | 20030722032406.GH10023@opencloud.com обсуждение исходный текст |
| Ответ на | Re: IN clauses via setObject(Collection) [Was: Re: Prepared (Dmitry Tkach <dmitry@openratings.com>) |
| Список | pgsql-jdbc |
On Mon, Jul 21, 2003 at 12:33:40PM -0400, Dmitry Tkach wrote:
> >
> >
> >Also.. what would we do with this object?
> >
> >public class AnnoyingObject implements java.util.Collection,
> >java.sql.Array {
> > // ...
> >}
> >
> >then setObject(n, new AnnoyingObject(), Types.ARRAY);
> >
> >Is that an Array, or an IN clause of Arrays? :)
> >
> >(Array is the obvious candidate for also being a Collection, but
> >potentially
> >you could do it with other types too)
> >
> >
> >
> java.sql.Array is an ARRAY.
> I don't think there is any ambiguity here, as it is the only reason I
> can imagine for somebody to implement a sql.Array is to pass an ARRAY
> into a PreparedStatement.
>
>
> If they wanted a set of arrays, they would have to pass in a Collection,
> containing java.sql.Arrays as elements...
Reread the class declaration, AnnoyingObject is both an Array and a
Collection.
-O
В списке pgsql-jdbc по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера