@@ -480,7 +480,7 @@ Thus, the method name results in a query expression of `SELECT … FROM person W
480
480
It completes with `IncorrectResultSizeDataAccessException` on non-unique results.
481
481
<6> In contrast to <3>, the first entity is always emitted even if the query yields more result documents.
482
482
<7> The `findByLastname` method shows a query for all people with the given last name.
483
- <8> The `streamByLastname` method returns a `Stream` which makes values possible as soon as they are returned from the database.
483
+ <8> The `streamByLastname` method returns a `Stream`, which makes values possible as soon as they are returned from the database.
484
484
====
485
485
486
486
The following table shows the keywords that are supported for query methods:
@@ -628,13 +628,13 @@ The location of that file may be changed by setting a value to `@EnableJdbcRepos
628
628
[[jdbc.query-methods.at-query.streaming-results]]
629
629
==== Streaming Results
630
630
631
- When you specify ` Stream` as the return type of a query method Spring Data JDBC will return elements as soon as they become available.
631
+ When you specify Stream as the return type of a query method, Spring Data JDBC returns elements as soon as they become available.
632
632
When dealing with large amounts of data this is suitable for reducing latency and memory requirements.
633
633
634
634
The stream contains an open connection to the database.
635
- To avoid memory leaks that connection needs to be closed eventually by closing the stream.
636
- The recommended way to do that is a try-with-resource clause.
637
- It also means once the connection to the database is closed, the stream cannot obtain further elements and will likely throw an exception.
635
+ To avoid memory leaks, that connection needs to be closed eventually, by closing the stream.
636
+ The recommended way to do that is a ` try-with-resource clause` .
637
+ It also means that, once the connection to the database is closed, the stream cannot obtain further elements and likely throws an exception.
638
638
639
639
[[jdbc.query-methods.at-query.custom-rowmapper]]
640
640
==== Custom `RowMapper`
0 commit comments