Hi Julian,

Thank you very much for sharing this. Oh wow, that does look like a lot of
glue code. If you feel there are any specific areas / pain points where you
had expected a bit less friction from the jOOQ side, do let me know and I'm
happy to discuss.

Regarding your question:

2017-05-20 9:29 GMT+02:00 Julian Decker <[email protected]>:

> My Question: how to get the name of the table out of the record? during
> Debugging it's possible to see the table name but is there a function to
> get it?
>
>
> <https://lh3.googleusercontent.com/-RZ5bD3T4Pbk/WR_sWppS6VI/AAAAAAAAW3Y/5-Tt5oceOlM8FE9rCA4Muj5FQZab4d9XQCLcB/s1600/Unbenannt.JPG>
>
>
>
>
You're looking for the TableRecord type, not the Record type. There's
TableRecord.getTable()
- https://www.jooq.org/javadoc/latest/org/jooq/TableRecord.html#getTable--

A TableRecord is what you're getting when you're selecting using
DSLContext.selectFrom():
-
https://www.jooq.org/javadoc/latest/org/jooq/DSLContext.html#selectFrom-org.jooq.Table-

These select statements are guaranteed not to contain any custom
projections / joins, etc. but only columns from a single table. Another
option is to use Result.into(Table) or ResultQuery.fetchInto(Table):

-
https://www.jooq.org/javadoc/latest/org/jooq/Result.html#into-org.jooq.Table-
-
https://www.jooq.org/javadoc/latest/org/jooq/ResultQuery.html#fetchInto-org.jooq.Table-

These will take any Result and pick only the columns from a specific table
to create new TableRecords from them.

Hope this helps,
Lukas

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to