Using ResultSet I can get ResultSetMetaData from which I can get size of the database column in characters (for example 15 for varchar(15)) using metaData.getColumnDisplaySize(index). Is it any way I can get this size using jOOQ?
With ResultSet I have problem with UDT and I am already using jOOQ for access to database (and it works well with UDT) so it would be perfect if yes
The meta information that you’re looking for is not provided by jOOQ 2.x APIs. Adding length, precision, and scale to the
org.jooq.DataTypeAPI is planned for the upcoming release 3.0This is registered as feature request #456
As a matter of fact, this is now implemented on github, and will be included in jOOQ 3.0. The API usage needed to achieve what you’re looking for will look like this (an example):
In essence,
org.jooq.DataTypewill have these three methods: