Re: (How to) Make SQLData of UUID? - Mailing list pgsql-jdbc

From Thomas Kellerer
Subject Re: (How to) Make SQLData of UUID?
Date
Msg-id bc8fde4a-2bbf-e8a3-a542-bb9f71520593@gmx.net
Whole thread Raw
In response to Re: (How to) Make SQLData of UUID?  (Alexander Myodov <amyodov@gmail.com>)
List 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 by date:

Previous
From: Alexander Myodov
Date:
Subject: Re: (How to) Make SQLData of UUID?
Next
From: Alexander Myodov
Date:
Subject: (How to) Make composite PGObject with Text? (Was: (How to) MakeSQLData of UUID?)