You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
I need some assistance in fetching nested data structures by jooq.
JOOQ provides dsl:
record Name(StringfirstName, StringlastName) {}
record Book(intid, Stringtitle) {}
record Author(intid, Namename, List<Book> books) {} // Is now using a List<Book> instead of Book[]// Again, no structural typing here has gone!List<Author> authors =
create.select(
AUTHOR.ID,
row(AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME).mapping(Name::new),
array(
select(row(BOOK.ID, BOOK.TITLE).mapping(Book.class, Book::new)
.from(BOOK)
.where(BOOK.AUTHOR_ID.eq(AUTHOR.ID))
).convertFrom(Arrays::asList) // Additional converter here
)
.from(AUTHOR)
.fetch(Records.mapping(Author::new));
Is it possible to use this API in conjunction with vertx and vertx-jooq libraries?
The text was updated successfully, but these errors were encountered:
Sorry for the late response. That should work when using a jdbc-module with an instance of io.github.jklingsporn.vertx.jooq.shared.internal.jdbc.JDBCQueryExecutor. When you want to go reactive, I'm afraid we're limited to the mapping capabilities of the reactive pg client.
Hello!
I need some assistance in fetching nested data structures by jooq.
JOOQ provides dsl:
Is it possible to use this API in conjunction with vertx and vertx-jooq libraries?
The text was updated successfully, but these errors were encountered: