AJ1Stmt.setObject()

Поиск
Список
Период
Сортировка
От Brian Olson
Тема AJ1Stmt.setObject()
Дата
Msg-id EAB684AC-859E-11D8-8DC5-000393D1CAB0@bolson.org
обсуждение исходный текст
Ответы Re: AJ1Stmt.setObject()  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-jdbc
I think AbstractJdbc1Statement.setObject(int,Object) needs to know how
to handle Java array types.
Last month someone mentioned the desire for using binary protocols and
I agree. Until then, I'd guess that
setObject( new int[]{1,2,3} )
should do
setString( "{1,2,3}" )

And so on for the other Java primitive types and String. I suppose for
Object[] one would get
"{" + x[0].toString() + "," + x[1].toString() ... "}"
That would match the current setObject behavior of defaulting to the
toString() value.

My problem is that I don't see any other way in jdbc to set array
elements of rows. So, this must be it, though unimplemented here.

I could probably whip this up in a couple hours. I'm looking for feed
back on whether it's the right thing to do.

Brian Olson
http://bolson.org/


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

Предыдущее
От: "scott.marlowe"
Дата:
Сообщение: Re: disabling seq scans
Следующее
От: Carter Harrison
Дата:
Сообщение: Storing Large Objects: ClassCastException