Re: (How to) Make SQLData of UUID?

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: (How to) Make SQLData of UUID?
Дата
Msg-id bc8fde4a-2bbf-e8a3-a542-bb9f71520593@gmx.net
обсуждение исходный текст
Ответ на Re: (How to) Make SQLData of UUID?  (Alexander Myodov <amyodov@gmail.com>)
Список pgsql-jdbc
Alexander Myodov schrieb am 22.07.2019 um 01:43:
> The problem is not in making a PL/PgSQL function returning an UUID.
> Or even returning a custom type containing an UUID (like
> MYFUNC_RETURN_TYPE in my case). The problem is on Java level, when I
> need to make a Java handler/mapping of PostgreSQL custom type (which
> contains an UUID internally).


You don't need a wrapper. 

ResultSet.getObject(1, UUID.class)

and 

PreparedStatement.setObject(1, someUUID);

will work just fine. 

Thomas



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

Предыдущее
От: Alexander Myodov
Дата:
Сообщение: Re: (How to) Make SQLData of UUID?
Следующее
От: Alexander Myodov
Дата:
Сообщение: (How to) Make composite PGObject with Text? (Was: (How to) MakeSQLData of UUID?)