Skip to content

Commit

Permalink
java CDK: add debug logging of executed SQL in TestDatabase (#33513)
Browse files Browse the repository at this point in the history
  • Loading branch information
postamar committed Dec 15, 2023
1 parent 7ddcc02 commit 96ac32e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,13 @@ public Database getDatabase() {
return new Database(getDslContext());
}

protected void execSQL(Stream<String> sql) {
protected void execSQL(final Stream<String> sql) {
try {
getDatabase().query(ctx -> {
sql.forEach(ctx::execute);
sql.forEach(statement -> {
LOGGER.debug("{}", statement);
ctx.execute(statement);
});
return null;
});
} catch (SQLException e) {
Expand Down

0 comments on commit 96ac32e

Please sign in to comment.