All versions: 3.11 | 3.10 | 3.9 | 3.8 | 3.7 | Development versions: 3.12

A common use-case for importing records via jOOQ's Loader API is when data needs to be transferred between databases. For instance, when fetching the following data from database 1:

Result<Record3<Integer, Integer, String>> result =
DSL.using(configuration1)
   .select(BOOK.ID, BOOK.AUTHOR_ID, BOOK.TITLE)
   .from(BOOK)
   .fetch();

Now, this result should be imported back into a database 2:

DSL.using(configuration2)
   .loadInto(BOOK)
   .loadRecords(result)
   .fields(BOOK.ID, BOOK.AUTHOR_ID, BOOK.TITLE)
   .execute();

No other, Record-specific options are currently available. For additional Loader API options, please refer to the manual's section about importing CSV.

The jOOQ Logo