From: | Oliver Jowett <oliver(at)opencloud(dot)com> |
---|---|
To: | Dmitry Tkach <dmitry(at)openratings(dot)com> |
Cc: | Kim Ho <kho(at)redhat(dot)com>, Fernando Nasser <fnasser(at)redhat(dot)com>, Barry Lind <blind(at)xythos(dot)com>, pgsql-jdbc-list <pgsql-jdbc(at)postgresql(dot)org>, Dave Cramer <Dave(at)micro-automation(dot)net> |
Subject: | Re: Prepared Statements |
Date: | 2003-07-21 14:36:15 |
Message-ID: | 20030721143614.GH2506@opencloud.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
On Mon, Jul 21, 2003 at 10:27:30AM -0400, Dmitry Tkach wrote:
> Why not just allow setObject() to take Collection as an argument?
You need information on the SQL type of the contents to be able to turn them
into a DB representation correctly. We can't use the type parameter to
setObject() for this as that should reflect the whole paramater, i.e.
probably Types.OTHER in this case.
java.sql.Array has a getBaseType() that does the job.
> You would not need any special implementations then... and the
> application would not need to waste cycles on wrapping/unwrapping those
> Arrays every time...
Hah, and it's faster to wrap your array of ints in a bunch of
java.lang.Integer objects so you can put in in a Collection? :)
-O
From | Date | Subject | |
---|---|---|---|
Next Message | Dmitry Tkach | 2003-07-21 14:39:11 | Re: Prepared Statements |
Previous Message | Fernando Nasser | 2003-07-21 14:34:10 | Re: Prepared Statements |