Hi Felix, You don't have to use the loader API. Instead, create an InsertQuery through DSLContext.insertQuery(Table) and then add records to it through InsertQuery.addRecord(). Finally, instead of executing the query, call InsertQuery.getSQL() and getBindValues() on it.
Hope this helps, Lukas Am Mi., 20. Juni 2018 um 08:53 Uhr schrieb <[email protected]>: > Hi, > > I don't think this is what JOOQ is designed for but I would like to know > if it is possible to generate SQL statements only without executing the > statement for a batch Insert statements. > > something like > > > create.loadInto(TABLE_NAME) > .loadRecords(List<Records> records) > .toSql(); > > > > that would create the following sql > > INSERT INTO TABLE_NAME(field1, field2, .... fieldn) > values(val1, val2, ... valn), > ..., > values(val1, val2, .. valn); > > > Thanks, > > Felix > > -- > 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. > -- 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.
