How to obtain the typed field instances from a typed org.jooq.Table instance

Viewed 23

I have a function that returns an org.jooq.Table<RecordN<.....>> is there a way to obtain typed field instances without having to specify the types again?

final Table<Record11<String, Long, String, String, String, String, String, Timestamp,
                                                     String, String, Timestamp>> upcoming =
                                 tableUpcomingFor(i_app, i_req, sport_idName, minDateName);

At the moment I have to do something like:

final Field<Timestamp> minDate = upcoming.field(name("minDate"), Timestamp.class);

This seems redundant, I should be able to get the typed fields by position. Is there a way to do that? I require multiple fields for use in an outer query that uses the table instance.

Any ideas how to do that?

0 Answers
Related