[jOOQ/jOOQ#9141] DDLDatabase should output query results to log output
This commit is contained in:
parent
4bad893e6a
commit
babd9cee27
@ -60,6 +60,7 @@ import org.jooq.Name;
|
||||
import org.jooq.Name.Quoted;
|
||||
import org.jooq.Queries;
|
||||
import org.jooq.Query;
|
||||
import org.jooq.ResultQuery;
|
||||
import org.jooq.VisitContext;
|
||||
import org.jooq.conf.ParseUnknownFunctions;
|
||||
import org.jooq.conf.Settings;
|
||||
@ -192,8 +193,13 @@ public class DDLDatabase extends H2Database {
|
||||
repeat:
|
||||
for (;;) {
|
||||
try {
|
||||
query.execute();
|
||||
log.info(query);
|
||||
|
||||
if (query instanceof ResultQuery)
|
||||
log.info("\n" + ((ResultQuery<?>) query).fetch());
|
||||
else
|
||||
log.info("Update count: " + query.execute());
|
||||
|
||||
break repeat;
|
||||
}
|
||||
catch (DataAccessException e) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user