Re: Object types and ResultSets (java.sql.Struct)

Поиск
Список
Период
Сортировка
От Andreas Joseph Krogh
Тема Re: Object types and ResultSets (java.sql.Struct)
Дата
Msg-id 4C61BE01.8010505@officenet.no
обсуждение исходный текст
Ответ на Re: Object types and ResultSets (java.sql.Struct)  (Kris Jurka <books@ejurka.com>)
Ответы Re: Object types and ResultSets (java.sql.Struct)
Список pgsql-jdbc
On 08/10/2010 10:00 PM, Kris Jurka wrote:


On Fri, 29 Jan 2010, Kris Jurka wrote:

On Sat, 23 Jan 2010, Thomas Kellerer wrote:

DatabaseMetaData.getColumns() will return a java.sql.Types.STRUCT for the column "contact".
That seems to be correct to me - at least this is what I expected ;)

When running a "SELECT * FROM contacts", ResultSetMetaData.getColumnType() will return java.sql.Types.OTHER  (for the contact column)

This seems to be inconsistent to me.

My expectation was that ResultSetMetaData.getColumnType() should also return java.sql.Types.STRUCT

That should be easy enough to fix.  I'll take a look.

I've applied a fix to this for 8.3, 8.4, and 9.0 in CVS.


What about this?
>>  and that the object returned by getObject() on the
>> ResultSet should implement java.sql.Struct (which it doesn't)
>
>That one will take some more work.  I wouldn't hold my breath on that one.

Without proper support for Struct returning custom-types (i.e. arrays of arrays) becomes a pain. Any word on this?
-- 
Andreas Joseph Krogh <andreak@officenet.no>
Senior Software Developer / CTO
------------------------+---------------------------------------------+
OfficeNet AS            | The most difficult thing in the world is to |
Rosenholmveien 25       | know how to do a thing and to watch         |
1414 Trollåsen          | somebody else doing it wrong, without       |
NORWAY                  | comment.                                    |                       |                                             |
Tlf:    +47 24 15 38 90 |                                             |
Fax:    +47 24 15 38 91 |                                             |
Mobile: +47 909  56 963 |                                             |
------------------------+---------------------------------------------+

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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: Object types and ResultSets (java.sql.Struct)
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: Object types and ResultSets (java.sql.Struct)