1

When I create and use a stream with Speedment, how can I see what is sent to the database? For example, if I try the first example on GitHub:

Optional<Film> longFilm = films.stream()
    .filter(Film.LENGTH.greaterThan(120))
    .findAny();
  • Welcome to SO. Please read this [how-to-ask](http://stackoverflow.com/help/how-to-ask) and follow the guidelines there to improve your question with sufficient information to describe and reproduce your problem. – thewaywewere May 04 '17 at 04:57

1 Answers1

2

You can see the queries generated by attaching a logger to the builder when you first setup the Speedment Application.

final DemoApplication app = new DemoApplicationBuilder()
        .withLogging(ApplicationBuilder.LogType.STREAM)
        .build();

Now when you invoke .findAny(), the generated SQL query will be shown in the output.

Emil Forslund
  • 549
  • 4
  • 12