add test coverage for Option and Stream return types

This commit is contained in:
Gavin King 2024-02-25 20:29:19 +01:00
parent bfce032efc
commit f73d7aac9f
1 changed files with 8 additions and 0 deletions

View File

@ -17,6 +17,8 @@ import org.hibernate.StatelessSession;
import java.time.LocalDate;
import java.util.List;
import java.util.Optional;
import java.util.stream.Stream;
@Repository(dataStore = "myds")
public interface BookAuthorRepository {
@ -26,6 +28,9 @@ public interface BookAuthorRepository {
@Find
Book book(String isbn);
@Find
Optional<Book> bookIfAny(String isbn);
@Find
Author author(String ssn);
@ -76,4 +81,7 @@ public interface BookAuthorRepository {
@Query("from Book where title like :title")
List<Book> books3(String title, Limit limit, Sort<Book>... order);
@Query("select title from Book where title like :title order by isbn")
Stream<String> titles(String title);
}