You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jooq...@googlegroups.com
> My team have problem with fetching data from tables containing uuid column
> type? Does that data type is support by Jooq or how implement fetching data
> to string type?
Currently, I suggest you have this type treated as VARCHAR / String.
What type of problems are you running into?
Cheers
Lukas
Lukas Eder
unread,
Dec 26, 2012, 11:39:53 AM12/26/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jooq...@googlegroups.com
Hello,
Already today, you can use org.jooq.Converter types to convert some of
your database columns to UUID's. Please consider the relevant sections
of the manual for this:
Formal UUID support for Postgres, SQL Server and some other databases
that natively support such a type is on the roadmap:
https://github.com/jOOQ/jOOQ/issues/1624
Cheers
Lukas
2012/12/26 adela <ad...@oax.com>:
> I am also trying to use UUID (as Primary Key) in PostgreSQL DB. It would be
> nice to have native java.util.UUID support
> (via JOOQ) for many reasons such as type safety, performance,...and less
> code trying to convert/validate UUID correctness to/from DB....
adela
unread,
Dec 28, 2012, 7:07:23 PM12/28/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jooq...@googlegroups.com
Lukas,
You are awesome! Keep up the good work! Thank you...That would be really nice to have in today's distributed environments!
Lukas Eder
unread,
Jan 5, 2013, 4:27:05 AM1/5/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jooq...@googlegroups.com, ad...@oax.com
It seems that the Postgres JDBC driver natively supports java.util.UUID through ResultSet.getObject() and PreparedStatement.setObject(). Adding support seems as simple as adding an org.jooq.impl.SQLDataType.UUID that maps the "uuid" type name to the java.util.UUID class.
This will be implemented in jOOQ 3.0 and has a high chance of being backported to 2.7. I will see if UUID types can be supported for all databases through jOOQ's internal type mapping
In other databases, jOOQ allows for mapping the java.util.UUID type to a CHAR/VARCHAR columns. Implementations that map UUIDs to BINARY(16) can be achieved through custom data types using Converters