Re: Prepared Statements - Mailing list pgsql-jdbc

From Dmitry Tkach
Subject Re: Prepared Statements
Date
Msg-id 3F1BFCD0.80507@openratings.com
Whole thread Raw
In response to Re: Prepared Statements  (Fernando Nasser <fnasser@redhat.com>)
List pgsql-jdbc
>
>
>>>
>> Why not just allow setObject() to take Collection as an argument?
>> You would not need any special implementations then... and the
>> application would not need to waste cycles on wrapping/unwrapping
>> those Arrays every time...
>>
>
> That is an interesting idea.  But how do we know the type of the
> elements that should go in the list?  We will just get java.Objects as
> we go through the Collection.
>
>
You can require the 'type' argument to setObject() to specify the target
type.

Besides, knowing the exact type doesn't really matter much, because you
aare going to be quoting everything anyways :-)

Dima



pgsql-jdbc by date:

Previous
From: Fernando Nasser
Date:
Subject: Re: Prepared Statements
Next
From: Fernando Nasser
Date:
Subject: Re: Prepared Statements